Remove duplicate ERR_PRINTS macro
This commit is contained in:
parent
2d3c0d311c
commit
5a58516231
74 changed files with 158 additions and 167 deletions
|
@ -3053,7 +3053,7 @@ Ref<JSONParseResult> _JSON::parse(const String &p_json) {
|
||||||
result->error = JSON::parse(p_json, result->result, result->error_string, result->error_line);
|
result->error = JSON::parse(p_json, result->result, result->error_string, result->error_line);
|
||||||
|
|
||||||
if (result->error != OK) {
|
if (result->error != OK) {
|
||||||
ERR_PRINTS(vformat("Error parsing JSON at line %s: %s", result->error_line, result->error_string));
|
ERR_PRINT(vformat("Error parsing JSON at line %s: %s", result->error_line, result->error_string));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -513,7 +513,7 @@ Object *ClassDB::instance(const StringName &p_class) {
|
||||||
}
|
}
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (ti->api == API_EDITOR && !Engine::get_singleton()->is_editor_hint()) {
|
if (ti->api == API_EDITOR && !Engine::get_singleton()->is_editor_hint()) {
|
||||||
ERR_PRINTS("Class '" + String(p_class) + "' can only be instantiated by editor.");
|
ERR_PRINT("Class '" + String(p_class) + "' can only be instantiated by editor.");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -474,15 +474,6 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
|
||||||
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, m_string); \
|
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, m_string); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Prints an error message without returning.
|
|
||||||
* FIXME: Remove this macro and replace all uses with `ERR_PRINT` as it's identical.
|
|
||||||
*/
|
|
||||||
#define ERR_PRINTS(m_string) \
|
|
||||||
{ \
|
|
||||||
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, m_string); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints an error message without returning, but only do so once in the application lifecycle.
|
* Prints an error message without returning, but only do so once in the application lifecycle.
|
||||||
* This can be used to avoid spamming the console with error messages.
|
* This can be used to avoid spamming the console with error messages.
|
||||||
|
|
|
@ -52,7 +52,7 @@ Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_c
|
||||||
Error err;
|
Error err;
|
||||||
f = FileAccess::open(p_file, FileAccess::READ, &err);
|
f = FileAccess::open(p_file, FileAccess::READ, &err);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
ERR_PRINTS("Error opening file '" + p_file + "'.");
|
ERR_PRINT("Error opening file '" + p_file + "'.");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_c
|
||||||
}
|
}
|
||||||
Error err = loader[i]->load_image(p_image, f, p_force_linear, p_scale);
|
Error err = loader[i]->load_image(p_image, f, p_force_linear, p_scale);
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Error loading image: " + p_file);
|
ERR_PRINT("Error loading image: " + p_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err != ERR_FILE_UNRECOGNIZED) {
|
if (err != ERR_FILE_UNRECOGNIZED) {
|
||||||
|
|
|
@ -193,7 +193,7 @@ IP_Address IP::get_resolve_item_address(ResolverID p_id) const {
|
||||||
MutexLock lock(resolver->mutex);
|
MutexLock lock(resolver->mutex);
|
||||||
|
|
||||||
if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
|
if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
|
||||||
ERR_PRINTS("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
|
ERR_PRINT("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
|
||||||
return IP_Address();
|
return IP_Address();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ Array IP::get_resolve_item_addresses(ResolverID p_id) const {
|
||||||
MutexLock lock(resolver->mutex);
|
MutexLock lock(resolver->mutex);
|
||||||
|
|
||||||
if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
|
if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
|
||||||
ERR_PRINTS("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
|
ERR_PRINT("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
|
||||||
return Array();
|
return Array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, int
|
||||||
node = root_node->get_node(np);
|
node = root_node->get_node(np);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
ERR_PRINTS("Failed to get path from RPC: " + String(np) + ".");
|
ERR_PRINT("Failed to get path from RPC: " + String(np) + ".");
|
||||||
} else {
|
} else {
|
||||||
// Use cached path.
|
// Use cached path.
|
||||||
int id = target;
|
int id = target;
|
||||||
|
@ -264,7 +264,7 @@ Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, int
|
||||||
|
|
||||||
node = root_node->get_node(ni->path);
|
node = root_node->get_node(ni->path);
|
||||||
if (!node)
|
if (!node)
|
||||||
ERR_PRINTS("Failed to get cached path from RPC: " + String(ni->path) + ".");
|
ERR_PRINT("Failed to get cached path from RPC: " + String(ni->path) + ".");
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const StringName &p_name, int p_
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
String error = Variant::get_call_error_text(p_node, p_name, (const Variant **)argp.ptr(), argc, ce);
|
String error = Variant::get_call_error_text(p_node, p_name, (const Variant **)argp.ptr(), argc, ce);
|
||||||
error = "RPC - " + error;
|
error = "RPC - " + error;
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ void MultiplayerAPI::_process_rset(Node *p_node, const StringName &p_name, int p
|
||||||
p_node->set(p_name, value, &valid);
|
p_node->set(p_name, value, &valid);
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
String error = "Error setting remote property '" + String(p_name) + "', not found in object of type " + p_node->get_class() + ".";
|
String error = "Error setting remote property '" + String(p_name) + "', not found in object of type " + p_node->get_class() + ".";
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
|
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
|
||||||
error = "rpc() aborted in local call: - " + error + ".";
|
error = "rpc() aborted in local call: - " + error + ".";
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,7 +683,7 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
|
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
|
||||||
error = "rpc() aborted in script local call: - " + error + ".";
|
error = "rpc() aborted in script local call: - " + error + ".";
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@ void MultiplayerAPI::rsetp(Node *p_node, int p_peer_id, bool p_unreliable, const
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
String error = "rset() aborted in local set, property not found: - " + String(p_property) + ".";
|
String error = "rset() aborted in local set, property not found: - " + String(p_property) + ".";
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (p_node->get_script_instance()) {
|
} else if (p_node->get_script_instance()) {
|
||||||
|
@ -736,7 +736,7 @@ void MultiplayerAPI::rsetp(Node *p_node, int p_peer_id, bool p_unreliable, const
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
String error = "rset() aborted in local script set, property not found: - " + String(p_property) + ".";
|
String error = "rset() aborted in local script set, property not found: - " + String(p_property) + ".";
|
||||||
ERR_PRINTS(error);
|
ERR_PRINT(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1549,7 +1549,7 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
|
||||||
|
|
||||||
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
|
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
|
||||||
if (res->get_path() == path) {
|
if (res->get_path() == path) {
|
||||||
ERR_PRINTS("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
|
ERR_PRINT("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int idx = external_resources.size();
|
int idx = external_resources.size();
|
||||||
|
|
|
@ -72,7 +72,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return OK;
|
return OK;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("ResourceFormatImporter::load - " + p_path + ".import:" + itos(lines) + " error: " + error_text);
|
ERR_PRINT("ResourceFormatImporter::load - " + p_path + ".import:" + itos(lines) + " error: " + error_text);
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ void ResourceFormatImporter::get_internal_resource_path_list(const String &p_pat
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return;
|
return;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("ResourceFormatImporter::get_internal_resource_path_list - " + p_path + ".import:" + itos(lines) + " error: " + error_text);
|
ERR_PRINT("ResourceFormatImporter::get_internal_resource_path_list - " + p_path + ".import:" + itos(lines) + " error: " + error_text);
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -789,7 +789,7 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
|
||||||
if (err == ERR_FILE_EOF) {
|
if (err == ERR_FILE_EOF) {
|
||||||
break;
|
break;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("Parse error: " + p_path + ".remap:" + itos(lines) + " error: " + error_text + ".");
|
ERR_PRINT("Parse error: " + p_path + ".remap:" + itos(lines) + " error: " + error_text + ".");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -972,7 +972,7 @@ void ResourceLoader::finalize() {
|
||||||
#ifndef NO_THREADS
|
#ifndef NO_THREADS
|
||||||
const LoadingMapKey *K = nullptr;
|
const LoadingMapKey *K = nullptr;
|
||||||
while ((K = loading_map.next(K))) {
|
while ((K = loading_map.next(K))) {
|
||||||
ERR_PRINTS("Exited while resource is being loaded: " + K->path);
|
ERR_PRINT("Exited while resource is being loaded: " + K->path);
|
||||||
}
|
}
|
||||||
loading_map.clear();
|
loading_map.clear();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -240,7 +240,7 @@ void MessageQueue::_call_function(Object *p_target, const StringName &p_func, co
|
||||||
Variant::CallError ce;
|
Variant::CallError ce;
|
||||||
p_target->call(p_func, argptrs, p_argcount, ce);
|
p_target->call(p_func, argptrs, p_argcount, ce);
|
||||||
if (p_show_error && ce.error != Variant::CallError::CALL_OK) {
|
if (p_show_error && ce.error != Variant::CallError::CALL_OK) {
|
||||||
ERR_PRINTS("Error calling deferred method: " + Variant::get_call_error_text(p_target, p_func, argptrs, p_argcount, ce) + ".");
|
ERR_PRINT("Error calling deferred method: " + Variant::get_call_error_text(p_target, p_func, argptrs, p_argcount, ce) + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1235,7 +1235,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
|
||||||
if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) {
|
if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) {
|
||||||
//most likely object is not initialized yet, do not throw error.
|
//most likely object is not initialized yet, do not throw error.
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Error calling method from signal '" + String(p_name) + "': " + Variant::get_call_error_text(target, c.method, args, argc, ce) + ".");
|
ERR_PRINT("Error calling method from signal '" + String(p_name) + "': " + Variant::get_call_error_text(target, c.method, args, argc, ce) + ".");
|
||||||
err = ERR_METHOD_NOT_FOUND;
|
err = ERR_METHOD_NOT_FOUND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1960,7 +1960,7 @@ Object::~Object() {
|
||||||
|
|
||||||
if (_emitting) {
|
if (_emitting) {
|
||||||
//@todo this may need to actually reach the debugger prioritarily somehow because it may crash before
|
//@todo this may need to actually reach the debugger prioritarily somehow because it may crash before
|
||||||
ERR_PRINTS("Object " + to_string() + " was freed or unreferenced while a signal is being emitted from it. Try connecting to the signal using 'CONNECT_DEFERRED' flag, or use queue_free() to free the object (if this object is a Node) to avoid this error and potential crashes.");
|
ERR_PRINT("Object " + to_string() + " was freed or unreferenced while a signal is being emitted from it. Try connecting to the signal using 'CONNECT_DEFERRED' flag, or use queue_free() to free the object (if this object is a Node) to avoid this error and potential crashes.");
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((S = signal_map.next(nullptr))) {
|
while ((S = signal_map.next(nullptr))) {
|
||||||
|
|
|
@ -272,7 +272,7 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
|
||||||
FileAccess *fsrc = FileAccess::open(p_from, FileAccess::READ, &err);
|
FileAccess *fsrc = FileAccess::open(p_from, FileAccess::READ, &err);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
ERR_PRINTS("Failed to open " + p_from);
|
ERR_PRINT("Failed to open " + p_from);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
|
||||||
if (err) {
|
if (err) {
|
||||||
fsrc->close();
|
fsrc->close();
|
||||||
memdelete(fsrc);
|
memdelete(fsrc);
|
||||||
ERR_PRINTS("Failed to open " + p_to);
|
ERR_PRINT("Failed to open " + p_to);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -565,7 +565,7 @@ Error ProjectSettings::_load_settings_text(const String &p_path) {
|
||||||
last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
|
last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
|
||||||
return OK;
|
return OK;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
|
ERR_PRINT("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -962,7 +962,7 @@ void TranslationServer::set_locale(const String &p_locale) {
|
||||||
print_verbose(vformat("Unsupported locale '%s', falling back to '%s'.", p_locale, trimmed_locale));
|
print_verbose(vformat("Unsupported locale '%s', falling back to '%s'.", p_locale, trimmed_locale));
|
||||||
|
|
||||||
if (!is_locale_valid(trimmed_locale)) {
|
if (!is_locale_valid(trimmed_locale)) {
|
||||||
ERR_PRINTS(vformat("Unsupported locale '%s', falling back to 'en'.", trimmed_locale));
|
ERR_PRINT(vformat("Unsupported locale '%s', falling back to 'en'.", trimmed_locale));
|
||||||
locale = "en";
|
locale = "en";
|
||||||
} else {
|
} else {
|
||||||
locale = trimmed_locale;
|
locale = trimmed_locale;
|
||||||
|
|
|
@ -273,7 +273,7 @@ struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline StringName __constant_get_enum_name(T param, const String &p_constant) {
|
inline StringName __constant_get_enum_name(T param, const String &p_constant) {
|
||||||
if (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL)
|
if (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL)
|
||||||
ERR_PRINTS("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant);
|
ERR_PRINT("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant);
|
||||||
return GetTypeInfo<T>::get_class_info().class_name;
|
return GetTypeInfo<T>::get_class_info().class_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) {
|
||||||
Variant::CallError ce;
|
Variant::CallError ce;
|
||||||
obj->call(op.name, (const Variant **)argptrs.ptr(), argc, ce);
|
obj->call(op.name, (const Variant **)argptrs.ptr(), argc, ce);
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
ERR_PRINTS("Error calling method from signal '" + String(op.name) + "': " + Variant::get_call_error_text(obj, op.name, (const Variant **)argptrs.ptr(), argc, ce));
|
ERR_PRINT("Error calling method from signal '" + String(op.name) + "': " + Variant::get_call_error_text(obj, op.name, (const Variant **)argptrs.ptr(), argc, ce));
|
||||||
}
|
}
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
Resource *res = Object::cast_to<Resource>(obj);
|
Resource *res = Object::cast_to<Resource>(obj);
|
||||||
|
|
|
@ -221,7 +221,7 @@ void AudioDriverALSA::thread_func(void *p_udata) {
|
||||||
} else {
|
} else {
|
||||||
wrote = snd_pcm_recover(ad->pcm_handle, wrote, 0);
|
wrote = snd_pcm_recover(ad->pcm_handle, wrote, 0);
|
||||||
if (wrote < 0) {
|
if (wrote < 0) {
|
||||||
ERR_PRINTS("ALSA: Failed and can't recover: " + String(snd_strerror(wrote)));
|
ERR_PRINT("ALSA: Failed and can't recover: " + String(snd_strerror(wrote)));
|
||||||
ad->active = false;
|
ad->active = false;
|
||||||
ad->exit_thread = true;
|
ad->exit_thread = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ void MIDIDriverALSAMidi::thread_func(void *p_udata) {
|
||||||
ret = snd_rawmidi_read(midi_in, &byte, 1);
|
ret = snd_rawmidi_read(midi_in, &byte, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret != -EAGAIN) {
|
if (ret != -EAGAIN) {
|
||||||
ERR_PRINTS("snd_rawmidi_read error: " + String(snd_strerror(ret)));
|
ERR_PRINT("snd_rawmidi_read error: " + String(snd_strerror(ret)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (byte & 0x80) {
|
if (byte & 0x80) {
|
||||||
|
|
|
@ -234,7 +234,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("AudioUnitRender failed, code: " + itos(result));
|
ERR_PRINT("AudioUnitRender failed, code: " + itos(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
ad->unlock();
|
ad->unlock();
|
||||||
|
@ -246,7 +246,7 @@ void AudioDriverCoreAudio::start() {
|
||||||
if (!active) {
|
if (!active) {
|
||||||
OSStatus result = AudioOutputUnitStart(audio_unit);
|
OSStatus result = AudioOutputUnitStart(audio_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result));
|
ERR_PRINT("AudioOutputUnitStart failed, code: " + itos(result));
|
||||||
} else {
|
} else {
|
||||||
active = true;
|
active = true;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ void AudioDriverCoreAudio::stop() {
|
||||||
if (active) {
|
if (active) {
|
||||||
OSStatus result = AudioOutputUnitStop(audio_unit);
|
OSStatus result = AudioOutputUnitStop(audio_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result));
|
ERR_PRINT("AudioOutputUnitStop failed, code: " + itos(result));
|
||||||
} else {
|
} else {
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
@ -474,7 +474,7 @@ Error AudioDriverCoreAudio::capture_start() {
|
||||||
|
|
||||||
OSStatus result = AudioOutputUnitStart(input_unit);
|
OSStatus result = AudioOutputUnitStart(input_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result));
|
ERR_PRINT("AudioOutputUnitStart failed, code: " + itos(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -484,7 +484,7 @@ Error AudioDriverCoreAudio::capture_stop() {
|
||||||
if (input_unit) {
|
if (input_unit) {
|
||||||
OSStatus result = AudioOutputUnitStop(input_unit);
|
OSStatus result = AudioOutputUnitStop(input_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result));
|
ERR_PRINT("AudioOutputUnitStop failed, code: " + itos(result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,13 @@ Error MIDIDriverCoreMidi::open() {
|
||||||
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
||||||
CFRelease(name);
|
CFRelease(name);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("MIDIClientCreate failed, code: " + itos(result));
|
ERR_PRINT("MIDIClientCreate failed, code: " + itos(result));
|
||||||
return ERR_CANT_OPEN;
|
return ERR_CANT_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("MIDIInputPortCreate failed, code: " + itos(result));
|
ERR_PRINT("MIDIInputPortCreate failed, code: " + itos(result));
|
||||||
return ERR_CANT_OPEN;
|
return ERR_CANT_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
|
||||||
|
|
||||||
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
||||||
|
|
||||||
ERR_PRINTS(output);
|
ERR_PRINT(output);
|
||||||
}
|
}
|
||||||
#endif // CAN_DEBUG
|
#endif // CAN_DEBUG
|
||||||
|
|
||||||
|
|
|
@ -641,7 +641,7 @@ void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p
|
||||||
|
|
||||||
if (texture->resize_to_po2) {
|
if (texture->resize_to_po2) {
|
||||||
if (p_image->is_compressed()) {
|
if (p_image->is_compressed()) {
|
||||||
ERR_PRINTS("Texture '" + texture->path + "' is required to be a power of 2 because it uses either mipmaps or repeat, so it was decompressed. This will hurt performance and memory usage.");
|
ERR_PRINT("Texture '" + texture->path + "' is required to be a power of 2 because it uses either mipmaps or repeat, so it was decompressed. This will hurt performance and memory usage.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (img == p_image) {
|
if (img == p_image) {
|
||||||
|
|
|
@ -123,7 +123,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_PRINTS(p_error);
|
ERR_PRINT(p_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
|
||||||
|
|
||||||
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
|
||||||
|
|
||||||
ERR_PRINTS(output);
|
ERR_PRINT(output);
|
||||||
}
|
}
|
||||||
#endif // GLAD_ENABLED
|
#endif // GLAD_ENABLED
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_PRINTS(p_error);
|
ERR_PRINT(p_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
||||||
|
|
|
@ -239,7 +239,7 @@ Error AudioDriverPulseAudio::init_device() {
|
||||||
|
|
||||||
pa_str = pa_stream_new(pa_ctx, "Sound", &spec, &pa_map);
|
pa_str = pa_stream_new(pa_ctx, "Sound", &spec, &pa_map);
|
||||||
if (pa_str == nullptr) {
|
if (pa_str == nullptr) {
|
||||||
ERR_PRINTS("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
ERR_PRINT("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
|
||||||
const void *ptr = ad->samples_out.ptr();
|
const void *ptr = ad->samples_out.ptr();
|
||||||
ret = pa_stream_write(ad->pa_str, (char *)ptr + write_ofs, bytes_to_write, nullptr, 0LL, PA_SEEK_RELATIVE);
|
ret = pa_stream_write(ad->pa_str, (char *)ptr + write_ofs, bytes_to_write, nullptr, 0LL, PA_SEEK_RELATIVE);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERR_PRINTS("PulseAudio: pa_stream_write error: " + String(pa_strerror(ret)));
|
ERR_PRINT("PulseAudio: pa_stream_write error: " + String(pa_strerror(ret)));
|
||||||
} else {
|
} else {
|
||||||
avail_bytes -= bytes_to_write;
|
avail_bytes -= bytes_to_write;
|
||||||
write_ofs += bytes_to_write;
|
write_ofs += bytes_to_write;
|
||||||
|
@ -704,7 +704,7 @@ Error AudioDriverPulseAudio::capture_init_device() {
|
||||||
|
|
||||||
pa_rec_str = pa_stream_new(pa_ctx, "Record", &spec, &pa_rec_map);
|
pa_rec_str = pa_stream_new(pa_ctx, "Record", &spec, &pa_rec_map);
|
||||||
if (pa_rec_str == nullptr) {
|
if (pa_rec_str == nullptr) {
|
||||||
ERR_PRINTS("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
ERR_PRINT("PulseAudio: pa_stream_new error: " + String(pa_strerror(pa_context_errno(pa_ctx))));
|
||||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ Error AudioDriverPulseAudio::capture_init_device() {
|
||||||
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE);
|
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE);
|
||||||
int error_code = pa_stream_connect_record(pa_rec_str, dev, &attr, flags);
|
int error_code = pa_stream_connect_record(pa_rec_str, dev, &attr, flags);
|
||||||
if (error_code < 0) {
|
if (error_code < 0) {
|
||||||
ERR_PRINTS("PulseAudio: pa_stream_connect_record error: " + String(pa_strerror(error_code)));
|
ERR_PRINT("PulseAudio: pa_stream_connect_record error: " + String(pa_strerror(error_code)));
|
||||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ void AudioDriverPulseAudio::capture_finish_device() {
|
||||||
if (pa_rec_str) {
|
if (pa_rec_str) {
|
||||||
int ret = pa_stream_disconnect(pa_rec_str);
|
int ret = pa_stream_disconnect(pa_rec_str);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERR_PRINTS("PulseAudio: pa_stream_disconnect error: " + String(pa_strerror(ret)));
|
ERR_PRINT("PulseAudio: pa_stream_disconnect error: " + String(pa_strerror(ret)));
|
||||||
}
|
}
|
||||||
pa_stream_unref(pa_rec_str);
|
pa_stream_unref(pa_rec_str);
|
||||||
pa_rec_str = nullptr;
|
pa_rec_str = nullptr;
|
||||||
|
|
|
@ -51,12 +51,12 @@ Error MIDIDriverWinMidi::open() {
|
||||||
} else {
|
} else {
|
||||||
char err[256];
|
char err[256];
|
||||||
midiInGetErrorText(res, err, 256);
|
midiInGetErrorText(res, err, 256);
|
||||||
ERR_PRINTS("midiInOpen error: " + String(err));
|
ERR_PRINT("midiInOpen error: " + String(err));
|
||||||
|
|
||||||
MIDIINCAPS caps;
|
MIDIINCAPS caps;
|
||||||
res = midiInGetDevCaps(i, &caps, sizeof(MIDIINCAPS));
|
res = midiInGetDevCaps(i, &caps, sizeof(MIDIINCAPS));
|
||||||
if (res == MMSYSERR_NOERROR) {
|
if (res == MMSYSERR_NOERROR) {
|
||||||
ERR_PRINTS("Can't open MIDI device \"" + String(caps.szPname) + "\", is it being used by another application?");
|
ERR_PRINT("Can't open MIDI device \"" + String(caps.szPname) + "\", is it being used by another application?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -746,7 +746,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
|
||||||
config.instance();
|
config.instance();
|
||||||
err = config->load(path + ".import");
|
err = config->load(path + ".import");
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Could not parse: '" + path + "', not exported.");
|
ERR_PRINT("Could not parse: '" + path + "', not exported.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,14 +214,14 @@ Error EditorFeatureProfile::load_from_file(const String &p_path) {
|
||||||
Variant v;
|
Variant v;
|
||||||
err = JSON::parse(text, v, err_str, err_line);
|
err = JSON::parse(text, v, err_str, err_line);
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Error parsing '" + p_path + "' on line " + itos(err_line) + ": " + err_str);
|
ERR_PRINT("Error parsing '" + p_path + "' on line " + itos(err_line) + ": " + err_str);
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary json = v;
|
Dictionary json = v;
|
||||||
|
|
||||||
if (!json.has("type") || String(json["type"]) != "feature_profile") {
|
if (!json.has("type") || String(json["type"]) != "feature_profile") {
|
||||||
ERR_PRINTS("Error parsing '" + p_path + "', it's not a feature profile.");
|
ERR_PRINT("Error parsing '" + p_path + "', it's not a feature profile.");
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ void EditorFeatureProfileManager::_notification(int p_what) {
|
||||||
current.instance();
|
current.instance();
|
||||||
Error err = current->load_from_file(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(current_profile + ".profile"));
|
Error err = current->load_from_file(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(current_profile + ".profile"));
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Error loading default feature profile: " + current_profile);
|
ERR_PRINT("Error loading default feature profile: " + current_profile);
|
||||||
current_profile = String();
|
current_profile = String();
|
||||||
current.unref();
|
current.unref();
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,7 +371,7 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
|
||||||
if (err == ERR_FILE_EOF) {
|
if (err == ERR_FILE_EOF) {
|
||||||
break;
|
break;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("ResourceFormatImporter::load - '" + p_path + ".import:" + itos(lines) + "' error '" + error_text + "'.");
|
ERR_PRINT("ResourceFormatImporter::load - '" + p_path + ".import:" + itos(lines) + "' error '" + error_text + "'.");
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return false; //parse error, try reimport manually (Avoid reimport loop on broken file)
|
return false; //parse error, try reimport manually (Avoid reimport loop on broken file)
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
|
||||||
if (err == ERR_FILE_EOF) {
|
if (err == ERR_FILE_EOF) {
|
||||||
break;
|
break;
|
||||||
} else if (err != OK) {
|
} else if (err != OK) {
|
||||||
ERR_PRINTS("ResourceFormatImporter::load - '" + p_path + ".import.md5:" + itos(lines) + "' error '" + error_text + "'.");
|
ERR_PRINT("ResourceFormatImporter::load - '" + p_path + ".import.md5:" + itos(lines) + "' error '" + error_text + "'.");
|
||||||
memdelete(md5s);
|
memdelete(md5s);
|
||||||
return false; // parse error
|
return false; // parse error
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
|
||||||
da->change_dir("..");
|
da->change_dir("..");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Cannot go into subdir '" + E->get() + "'.");
|
ERR_PRINT("Cannot go into subdir '" + E->get() + "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
p_progress.update(idx, total);
|
p_progress.update(idx, total);
|
||||||
|
@ -1747,7 +1747,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
|
||||||
Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &metadata);
|
Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &metadata);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Error importing '" + p_file + "'.");
|
ERR_PRINT("Error importing '" + p_file + "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//as import is complete, save the .import file
|
//as import is complete, save the .import file
|
||||||
|
|
|
@ -2871,7 +2871,7 @@ void EditorNode::_tool_menu_option(int p_idx) {
|
||||||
handler->call(callback, (const Variant **)&ud, 1, ce);
|
handler->call(callback, (const Variant **)&ud, 1, ce);
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
String err = Variant::get_call_error_text(handler, callback, (const Variant **)&ud, 1, ce);
|
String err = Variant::get_call_error_text(handler, callback, (const Variant **)&ud, 1, ce);
|
||||||
ERR_PRINTS("Error calling function from tool menu: " + err);
|
ERR_PRINT("Error calling function from tool menu: " + err);
|
||||||
}
|
}
|
||||||
} // else it's a submenu so don't do anything.
|
} // else it's a submenu so don't do anything.
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -284,7 +284,7 @@ void EditorResourcePreview::_thread() {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
// Not returning as this would leave the thread hanging and would require
|
// Not returning as this would leave the thread hanging and would require
|
||||||
// some proper cleanup/disabling of resource preview generation.
|
// some proper cleanup/disabling of resource preview generation.
|
||||||
ERR_PRINTS("Cannot create file '" + file + "'. Check user write permissions.");
|
ERR_PRINT("Cannot create file '" + file + "'. Check user write permissions.");
|
||||||
} else {
|
} else {
|
||||||
f->store_line(itos(thumbnail_size));
|
f->store_line(itos(thumbnail_size));
|
||||||
f->store_line(itos(has_small_texture));
|
f->store_line(itos(has_small_texture));
|
||||||
|
|
|
@ -833,13 +833,13 @@ void EditorSettings::create() {
|
||||||
self_contained = true;
|
self_contained = true;
|
||||||
Error err = extra_config->load(exe_path + "/._sc_");
|
Error err = extra_config->load(exe_path + "/._sc_");
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Can't load config from path '" + exe_path + "/._sc_'.");
|
ERR_PRINT("Can't load config from path '" + exe_path + "/._sc_'.");
|
||||||
}
|
}
|
||||||
} else if (d->file_exists(exe_path + "/_sc_")) {
|
} else if (d->file_exists(exe_path + "/_sc_")) {
|
||||||
self_contained = true;
|
self_contained = true;
|
||||||
Error err = extra_config->load(exe_path + "/_sc_");
|
Error err = extra_config->load(exe_path + "/_sc_");
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Can't load config from path '" + exe_path + "/_sc_'.");
|
ERR_PRINT("Can't load config from path '" + exe_path + "/_sc_'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
|
@ -1093,7 +1093,7 @@ void EditorSettings::save() {
|
||||||
Error err = ResourceSaver::save(singleton->config_file_path, singleton);
|
Error err = ResourceSaver::save(singleton->config_file_path, singleton);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Error saving editor settings to " + singleton->config_file_path);
|
ERR_PRINT("Error saving editor settings to " + singleton->config_file_path);
|
||||||
} else {
|
} else {
|
||||||
print_verbose("EditorSettings: Save OK!");
|
print_verbose("EditorSettings: Save OK!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -629,7 +629,7 @@ Error ExportTemplateManager::install_android_template() {
|
||||||
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
|
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Can't uncompress file: " + to_write);
|
ERR_PRINT("Can't uncompress file: " + to_write);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -860,7 +860,7 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
|
||||||
error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nThis might be due to a configuration issue in the export preset or your export settings."), platform->get_name()));
|
error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nThis might be due to a configuration issue in the export preset or your export settings."), platform->get_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_PRINTS(vformat("Failed to export the project for platform '%s'.", platform->get_name()));
|
ERR_PRINT(vformat("Failed to export the project for platform '%s'.", platform->get_name()));
|
||||||
error_dialog->show();
|
error_dialog->show();
|
||||||
error_dialog->popup_centered_minsize(Size2(300, 80));
|
error_dialog->popup_centered_minsize(Size2(300, 80));
|
||||||
}
|
}
|
||||||
|
|
|
@ -591,7 +591,7 @@ void RenameDialog::rename() {
|
||||||
const String &new_name = to_rename[i].second;
|
const String &new_name = to_rename[i].second;
|
||||||
|
|
||||||
if (!n) {
|
if (!n) {
|
||||||
ERR_PRINTS("Skipping missing node: " + to_rename[i].first.get_concatenated_subnames());
|
ERR_PRINT("Skipping missing node: " + to_rename[i].first.get_concatenated_subnames());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1106,7 +1106,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||||
|
|
||||||
if (!new_node) {
|
if (!new_node) {
|
||||||
new_node = memnew(Node);
|
new_node = memnew(Node);
|
||||||
ERR_PRINTS("Creating root from favorite '" + selected_favorite_root + "' failed. Creating 'Node' instead.");
|
ERR_PRINT("Creating root from favorite '" + selected_favorite_root + "' failed. Creating 'Node' instead.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (p_tool) {
|
switch (p_tool) {
|
||||||
|
|
|
@ -329,7 +329,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
|
||||||
FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Failed to open " + p_file);
|
ERR_PRINT("Failed to open " + p_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vector<String> line;
|
Vector<String> line;
|
||||||
|
@ -364,7 +364,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
|
||||||
FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Failed to open " + p_file);
|
ERR_PRINT("Failed to open " + p_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1334,7 +1334,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||||
boot_logo.instance();
|
boot_logo.instance();
|
||||||
Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
|
Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
|
||||||
if (load_err)
|
if (load_err)
|
||||||
ERR_PRINTS("Non-existing or invalid boot splash at '" + boot_logo_path + "'. Loading default splash.");
|
ERR_PRINT("Non-existing or invalid boot splash at '" + boot_logo_path + "'. Loading default splash.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH)
|
#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH)
|
||||||
|
|
|
@ -57,10 +57,10 @@
|
||||||
|
|
||||||
// <--------------- Joint creation asserts
|
// <--------------- Joint creation asserts
|
||||||
/// Assert the body is assigned to a space
|
/// Assert the body is assigned to a space
|
||||||
#define JointAssertSpace(body, bIndex, ret) \
|
#define JointAssertSpace(body, bIndex, ret) \
|
||||||
if (!body->get_space()) { \
|
if (!body->get_space()) { \
|
||||||
ERR_PRINTS("Before create a joint the Body" + String(bIndex) + " must be added to a space!"); \
|
ERR_PRINT("Before create a joint the Body" + String(bIndex) + " must be added to a space!"); \
|
||||||
return ret; \
|
return ret; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assert the two bodies of joint are in the same space
|
/// Assert the two bodies of joint are in the same space
|
||||||
|
|
|
@ -128,7 +128,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
|
||||||
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale_abs(), p_margin);
|
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale_abs(), p_margin);
|
||||||
if (!btShape->isConvex()) {
|
if (!btShape->isConvex()) {
|
||||||
bulletdelete(btShape);
|
bulletdelete(btShape);
|
||||||
ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
||||||
|
@ -165,7 +165,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
|
||||||
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale(), p_margin);
|
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale(), p_margin);
|
||||||
if (!btShape->isConvex()) {
|
if (!btShape->isConvex()) {
|
||||||
bulletdelete(btShape);
|
bulletdelete(btShape);
|
||||||
ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
btConvexShape *bt_convex_shape = static_cast<btConvexShape *>(btShape);
|
btConvexShape *bt_convex_shape = static_cast<btConvexShape *>(btShape);
|
||||||
|
@ -226,7 +226,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
|
||||||
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
|
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
|
||||||
if (!btShape->isConvex()) {
|
if (!btShape->isConvex()) {
|
||||||
bulletdelete(btShape);
|
bulletdelete(btShape);
|
||||||
ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
||||||
|
@ -258,7 +258,7 @@ bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_sh
|
||||||
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
|
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
|
||||||
if (!btShape->isConvex()) {
|
if (!btShape->isConvex()) {
|
||||||
bulletdelete(btShape);
|
bulletdelete(btShape);
|
||||||
ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
|
||||||
|
|
|
@ -369,7 +369,7 @@ bool GDNative::initialize() {
|
||||||
if (err || !library_init) {
|
if (err || !library_init) {
|
||||||
OS::get_singleton()->close_dynamic_library(native_handle);
|
OS::get_singleton()->close_dynamic_library(native_handle);
|
||||||
native_handle = nullptr;
|
native_handle = nullptr;
|
||||||
ERR_PRINTS("Failed to obtain " + library->get_symbol_prefix() + "gdnative_init symbol");
|
ERR_PRINT("Failed to obtain " + library->get_symbol_prefix() + "gdnative_init symbol");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -732,7 +732,7 @@ void NativeScriptInstance::notification(int p_notification) {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (p_notification == MainLoop::NOTIFICATION_CRASH) {
|
if (p_notification == MainLoop::NOTIFICATION_CRASH) {
|
||||||
if (current_method_call != StringName("")) {
|
if (current_method_call != StringName("")) {
|
||||||
ERR_PRINTS("NativeScriptInstance detected crash on method: " + current_method_call);
|
ERR_PRINT("NativeScriptInstance detected crash on method: " + current_method_call);
|
||||||
current_method_call = "";
|
current_method_call = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ void register_gdnative_types() {
|
||||||
proc_ptr);
|
proc_ptr);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("No " + lib->get_symbol_prefix() + "gdnative_singleton in \"" + singleton->get_library()->get_current_library_path() + "\" found");
|
ERR_PRINT("No " + lib->get_symbol_prefix() + "gdnative_singleton in \"" + singleton->get_library()->get_current_library_path() + "\" found");
|
||||||
} else {
|
} else {
|
||||||
singleton_gdnatives.push_back(singleton);
|
singleton_gdnatives.push_back(singleton);
|
||||||
((void (*)())proc_ptr)();
|
((void (*)())proc_ptr)();
|
||||||
|
|
|
@ -771,7 +771,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
||||||
}
|
}
|
||||||
|
|
||||||
String message = *p_args[0];
|
String message = *p_args[0];
|
||||||
ERR_PRINTS(message);
|
ERR_PRINT(message);
|
||||||
r_ret = Variant();
|
r_ret = Variant();
|
||||||
} break;
|
} break;
|
||||||
case PUSH_WARNING: {
|
case PUSH_WARNING: {
|
||||||
|
@ -1211,7 +1211,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
r_ret = Variant();
|
r_ret = Variant();
|
||||||
ERR_PRINTS(vformat("Error parsing JSON at line %s: %s", errl, errs));
|
ERR_PRINT(vformat("Error parsing JSON at line %s: %s", errl, errs));
|
||||||
}
|
}
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -288,7 +288,7 @@ CryptoMbedTLS::CryptoMbedTLS() {
|
||||||
mbedtls_entropy_init(&entropy);
|
mbedtls_entropy_init(&entropy);
|
||||||
int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, nullptr, 0);
|
int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, nullptr, 0);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERR_PRINTS(" failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret));
|
ERR_PRINT(" failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,9 +157,9 @@ void CSharpLanguage::finish() {
|
||||||
Object *obj = ObjectDB::get_instance(id);
|
Object *obj = ObjectDB::get_instance(id);
|
||||||
|
|
||||||
if (obj) {
|
if (obj) {
|
||||||
ERR_PRINTS("Leaked unsafe reference to object: " + obj->to_string());
|
ERR_PRINT("Leaked unsafe reference to object: " + obj->to_string());
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Leaked unsafe reference to deleted object: " + itos(id));
|
ERR_PRINT("Leaked unsafe reference to deleted object: " + itos(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1072,7 +1072,7 @@ void CSharpLanguage::_load_scripts_metadata() {
|
||||||
int err_line;
|
int err_line;
|
||||||
Error json_err = JSON::parse(old_json, old_dict_var, err_str, err_line);
|
Error json_err = JSON::parse(old_json, old_dict_var, err_str, err_line);
|
||||||
if (json_err != OK) {
|
if (json_err != OK) {
|
||||||
ERR_PRINTS("Failed to parse metadata file: '" + err_str + "' (" + String::num_int64(err_line) + ").");
|
ERR_PRINT("Failed to parse metadata file: '" + err_str + "' (" + String::num_int64(err_line) + ").");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2372,7 +2372,7 @@ bool CSharpScript::_update_exports() {
|
||||||
if (tmp_native && !base_ref) {
|
if (tmp_native && !base_ref) {
|
||||||
Node *node = Object::cast_to<Node>(tmp_native);
|
Node *node = Object::cast_to<Node>(tmp_native);
|
||||||
if (node && node->is_inside_tree()) {
|
if (node && node->is_inside_tree()) {
|
||||||
ERR_PRINTS("Temporary instance was added to the scene tree.");
|
ERR_PRINT("Temporary instance was added to the scene tree.");
|
||||||
} else {
|
} else {
|
||||||
memdelete(tmp_native);
|
memdelete(tmp_native);
|
||||||
}
|
}
|
||||||
|
@ -2453,7 +2453,7 @@ bool CSharpScript::_get_signal(GDMonoClass *p_class, GDMonoClass *p_delegate, Ve
|
||||||
arg.type = GDMonoMarshal::managed_to_variant_type(types[i]);
|
arg.type = GDMonoMarshal::managed_to_variant_type(types[i]);
|
||||||
|
|
||||||
if (arg.type == Variant::NIL) {
|
if (arg.type == Variant::NIL) {
|
||||||
ERR_PRINTS("Unknown type of signal parameter: '" + arg.name + "' in '" + p_class->get_full_name() + "'.");
|
ERR_PRINT("Unknown type of signal parameter: '" + arg.name + "' in '" + p_class->get_full_name() + "'.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2482,7 +2482,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
|
||||||
if (p_member->is_static()) {
|
if (p_member->is_static()) {
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (p_member->has_attribute(CACHED_CLASS(ExportAttribute)))
|
if (p_member->has_attribute(CACHED_CLASS(ExportAttribute)))
|
||||||
ERR_PRINTS("Cannot export member because it is static: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
ERR_PRINT("Cannot export member because it is static: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2537,7 +2537,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
|
||||||
|
|
||||||
if (variant_type == Variant::NIL) {
|
if (variant_type == Variant::NIL) {
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
ERR_PRINTS("Unknown exported member type: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
ERR_PRINT("Unknown exported member type: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3330,7 +3330,7 @@ Error ResourceFormatSaverCSharpScript::save(const String &p_path, const RES &p_r
|
||||||
"Compile",
|
"Compile",
|
||||||
ProjectSettings::get_singleton()->globalize_path(p_path));
|
ProjectSettings::get_singleton()->globalize_path(p_path));
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("C# project could not be created; cannot add file: '" + p_path + "'.");
|
ERR_PRINT("C# project could not be created; cannot add file: '" + p_path + "'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -274,7 +274,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
||||||
Vector<String> link_target_parts = link_target.split(".");
|
Vector<String> link_target_parts = link_target.split(".");
|
||||||
|
|
||||||
if (link_target_parts.size() <= 0 || link_target_parts.size() > 2) {
|
if (link_target_parts.size() <= 0 || link_target_parts.size() > 2) {
|
||||||
ERR_PRINTS("Invalid reference format: '" + tag + "'.");
|
ERR_PRINT("Invalid reference format: '" + tag + "'.");
|
||||||
|
|
||||||
xml_output.append("<c>");
|
xml_output.append("<c>");
|
||||||
xml_output.append(tag);
|
xml_output.append(tag);
|
||||||
|
@ -370,7 +370,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
||||||
xml_output.append(target_enum_itype.proxy_name); // Includes nesting class if any
|
xml_output.append(target_enum_itype.proxy_name); // Includes nesting class if any
|
||||||
xml_output.append("\"/>");
|
xml_output.append("\"/>");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Cannot resolve enum reference in documentation: '" + link_target + "'.");
|
ERR_PRINT("Cannot resolve enum reference in documentation: '" + link_target + "'.");
|
||||||
|
|
||||||
xml_output.append("<c>");
|
xml_output.append("<c>");
|
||||||
xml_output.append(link_target);
|
xml_output.append(link_target);
|
||||||
|
@ -419,7 +419,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
||||||
xml_output.append(target_iconst->proxy_name);
|
xml_output.append(target_iconst->proxy_name);
|
||||||
xml_output.append("\"/>");
|
xml_output.append("\"/>");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Cannot resolve global constant reference in documentation: '" + link_target + "'.");
|
ERR_PRINT("Cannot resolve global constant reference in documentation: '" + link_target + "'.");
|
||||||
|
|
||||||
xml_output.append("<c>");
|
xml_output.append("<c>");
|
||||||
xml_output.append(link_target);
|
xml_output.append(link_target);
|
||||||
|
@ -459,7 +459,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
||||||
xml_output.append(target_iconst->proxy_name);
|
xml_output.append(target_iconst->proxy_name);
|
||||||
xml_output.append("\"/>");
|
xml_output.append("\"/>");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Cannot resolve constant reference in documentation: '" + link_target + "'.");
|
ERR_PRINT("Cannot resolve constant reference in documentation: '" + link_target + "'.");
|
||||||
|
|
||||||
xml_output.append("<c>");
|
xml_output.append("<c>");
|
||||||
xml_output.append(link_target);
|
xml_output.append(link_target);
|
||||||
|
@ -529,7 +529,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
||||||
xml_output.append(target_itype->proxy_name);
|
xml_output.append(target_itype->proxy_name);
|
||||||
xml_output.append("\"/>");
|
xml_output.append("\"/>");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Cannot resolve type reference in documentation: '" + tag + "'.");
|
ERR_PRINT("Cannot resolve type reference in documentation: '" + tag + "'.");
|
||||||
|
|
||||||
xml_output.append("<c>");
|
xml_output.append("<c>");
|
||||||
xml_output.append(tag);
|
xml_output.append(tag);
|
||||||
|
@ -1202,7 +1202,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
|
||||||
output.append(obj_types[itype.base_name].proxy_name);
|
output.append(obj_types[itype.base_name].proxy_name);
|
||||||
output.append("\n");
|
output.append("\n");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Base type '" + itype.base_name.operator String() + "' does not exist, for class '" + itype.name + "'.");
|
ERR_PRINT("Base type '" + itype.base_name.operator String() + "' does not exist, for class '" + itype.name + "'.");
|
||||||
return ERR_INVALID_DATA;
|
return ERR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2120,7 +2120,7 @@ const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_placehol
|
||||||
if (found)
|
if (found)
|
||||||
return found;
|
return found;
|
||||||
|
|
||||||
ERR_PRINTS(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'.");
|
ERR_PRINT(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'.");
|
||||||
|
|
||||||
const Map<StringName, TypeInterface>::Element *match = placeholder_types.find(p_typeref.cname);
|
const Map<StringName, TypeInterface>::Element *match = placeholder_types.find(p_typeref.cname);
|
||||||
|
|
||||||
|
@ -2352,7 +2352,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
|
||||||
imethod.return_type.cname = return_info.class_name;
|
imethod.return_type.cname = return_info.class_name;
|
||||||
if (!imethod.is_virtual && ClassDB::is_parent_class(return_info.class_name, name_cache.type_Reference) && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE) {
|
if (!imethod.is_virtual && ClassDB::is_parent_class(return_info.class_name, name_cache.type_Reference) && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE) {
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
ERR_PRINTS("Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'."
|
ERR_PRINT("Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'."
|
||||||
" Are you returning a reference type by pointer? Method: '" + itype.name + "." + imethod.name + "'.");
|
" Are you returning a reference type by pointer? Method: '" + itype.name + "." + imethod.name + "'.");
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
ERR_FAIL_V(false);
|
ERR_FAIL_V(false);
|
||||||
|
@ -2974,7 +2974,7 @@ void BindingsGenerator::_populate_global_constants() {
|
||||||
// HARDCODED: The Error enum have the prefix 'ERR_' for everything except 'OK' and 'FAILED'.
|
// HARDCODED: The Error enum have the prefix 'ERR_' for everything except 'OK' and 'FAILED'.
|
||||||
if (ienum.cname == name_cache.enum_Error) {
|
if (ienum.cname == name_cache.enum_Error) {
|
||||||
if (prefix_length > 0) { // Just in case it ever changes
|
if (prefix_length > 0) { // Just in case it ever changes
|
||||||
ERR_PRINTS("Prefix for enum '" _STR(Error) "' is not empty.");
|
ERR_PRINT("Prefix for enum '" _STR(Error) "' is not empty.");
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix_length = 1; // 'ERR_'
|
prefix_length = 1; // 'ERR_'
|
||||||
|
|
|
@ -234,7 +234,7 @@ MonoObject *godot_icall_GD_str2var(MonoString *p_str) {
|
||||||
Error err = VariantParser::parse(&ss, ret, errs, line);
|
Error err = VariantParser::parse(&ss, ret, errs, line);
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
String err_str = "Parse error at line " + itos(line) + ": " + errs + ".";
|
String err_str = "Parse error at line " + itos(line) + ": " + errs + ".";
|
||||||
ERR_PRINTS(err_str);
|
ERR_PRINT(err_str);
|
||||||
ret = err_str;
|
ret = err_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ MonoBoolean godot_icall_GD_type_exists(MonoString *p_type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void godot_icall_GD_pusherror(MonoString *p_str) {
|
void godot_icall_GD_pusherror(MonoString *p_str) {
|
||||||
ERR_PRINTS(GDMonoMarshal::mono_string_to_godot(p_str));
|
ERR_PRINT(GDMonoMarshal::mono_string_to_godot(p_str));
|
||||||
}
|
}
|
||||||
|
|
||||||
void godot_icall_GD_pushwarning(MonoString *p_str) {
|
void godot_icall_GD_pushwarning(MonoString *p_str) {
|
||||||
|
|
|
@ -637,7 +637,7 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
|
||||||
memdelete(da);
|
memdelete(da);
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
|
ERR_PRINT("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -654,7 +654,7 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
|
||||||
|
|
||||||
String assembly_file = assembly_name + ".dll";
|
String assembly_file = assembly_name + ".dll";
|
||||||
if (da->copy(src_dir.plus_file(assembly_file), dst_dir.plus_file(assembly_file)) != OK) {
|
if (da->copy(src_dir.plus_file(assembly_file), dst_dir.plus_file(assembly_file)) != OK) {
|
||||||
ERR_PRINTS("Failed to copy '" + assembly_file + "'.");
|
ERR_PRINT("Failed to copy '" + assembly_file + "'.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1124,7 +1124,7 @@ Error GDMono::finalize_and_unload_domain(MonoDomain *p_domain) {
|
||||||
mono_domain_try_unload(p_domain, (MonoObject **)&exc);
|
mono_domain_try_unload(p_domain, (MonoObject **)&exc);
|
||||||
|
|
||||||
if (exc) {
|
if (exc) {
|
||||||
ERR_PRINTS("Exception thrown when unloading domain '" + domain_name + "'.");
|
ERR_PRINT("Exception thrown when unloading domain '" + domain_name + "'.");
|
||||||
GDMonoUtils::debug_print_unhandled_exception(exc);
|
GDMonoUtils::debug_print_unhandled_exception(exc);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,7 +496,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
ERR_PRINTS("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
|
ERR_PRINT("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ void GDMonoLog::initialize() {
|
||||||
CharString log_level = OS::get_singleton()->get_environment("GODOT_MONO_LOG_LEVEL").utf8();
|
CharString log_level = OS::get_singleton()->get_environment("GODOT_MONO_LOG_LEVEL").utf8();
|
||||||
|
|
||||||
if (log_level.length() != 0 && get_log_level_id(log_level.get_data()) == -1) {
|
if (log_level.length() != 0 && get_log_level_id(log_level.get_data()) == -1) {
|
||||||
ERR_PRINTS(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
|
ERR_PRINT(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
|
||||||
log_level = CharString();
|
log_level = CharString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ void GDMonoLog::initialize() {
|
||||||
|
|
||||||
log_file = FileAccess::open(log_file_path, FileAccess::WRITE);
|
log_file = FileAccess::open(log_file_path, FileAccess::WRITE);
|
||||||
if (!log_file) {
|
if (!log_file) {
|
||||||
ERR_PRINTS("Mono: Cannot create log file at: " + log_file_path);
|
ERR_PRINT("Mono: Cannot create log file at: " + log_file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ String mono_to_utf8_string(MonoString *p_mono_string) {
|
||||||
char *utf8 = mono_string_to_utf8_checked(p_mono_string, &error);
|
char *utf8 = mono_string_to_utf8_checked(p_mono_string, &error);
|
||||||
|
|
||||||
if (!mono_error_ok(&error)) {
|
if (!mono_error_ok(&error)) {
|
||||||
ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
|
ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
|
||||||
mono_error_cleanup(&error);
|
mono_error_cleanup(&error);
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) {
|
||||||
if (!ScriptDebugger::get_singleton()) {
|
if (!ScriptDebugger::get_singleton()) {
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (Engine::get_singleton()->is_editor_hint()) {
|
if (Engine::get_singleton()->is_editor_hint()) {
|
||||||
ERR_PRINTS(GDMonoUtils::get_exception_name_and_message(p_exc));
|
ERR_PRINT(GDMonoUtils::get_exception_name_and_message(p_exc));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -444,7 +444,7 @@ void set_pending_exception(MonoException *p_exc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mono_runtime_set_pending_exception(p_exc, false)) {
|
if (!mono_runtime_set_pending_exception(p_exc, false)) {
|
||||||
ERR_PRINTS("Exception thrown from managed code, but it could not be set as pending:");
|
ERR_PRINT("Exception thrown from managed code, but it could not be set as pending:");
|
||||||
GDMonoUtils::debug_print_unhandled_exception(p_exc);
|
GDMonoUtils::debug_print_unhandled_exception(p_exc);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -317,7 +317,7 @@ MonoArray *_gd_mono_android_cert_store_lookup(MonoString *p_alias) {
|
||||||
char *alias_utf8 = mono_string_to_utf8_checked(p_alias, &mono_error);
|
char *alias_utf8 = mono_string_to_utf8_checked(p_alias, &mono_error);
|
||||||
|
|
||||||
if (!mono_error_ok(&mono_error)) {
|
if (!mono_error_ok(&mono_error)) {
|
||||||
ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
|
ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
|
||||||
mono_error_cleanup(&mono_error);
|
mono_error_cleanup(&mono_error);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -431,7 +431,7 @@ EditorNavigationMeshGenerator::~EditorNavigationMeshGenerator() {
|
||||||
|
|
||||||
void EditorNavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node) {
|
void EditorNavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node) {
|
||||||
if (!Engine::get_singleton()->is_editor_hint()) {
|
if (!Engine::get_singleton()->is_editor_hint()) {
|
||||||
ERR_PRINTS("Invoking EditorNavigationMeshGenerator::bake(...) in-game is not supported in Godot 3.2 or below. Aborting bake...");
|
ERR_PRINT("Invoking EditorNavigationMeshGenerator::bake(...) in-game is not supported in Godot 3.2 or below. Aborting bake...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -722,7 +722,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
|
||||||
static Error save_apk_so(void *p_userdata, const SharedObject &p_so) {
|
static Error save_apk_so(void *p_userdata, const SharedObject &p_so) {
|
||||||
if (!p_so.path.get_file().begins_with("lib")) {
|
if (!p_so.path.get_file().begins_with("lib")) {
|
||||||
String err = "Android .so file names must start with \"lib\", but got: " + p_so.path;
|
String err = "Android .so file names must start with \"lib\", but got: " + p_so.path;
|
||||||
ERR_PRINTS(err);
|
ERR_PRINT(err);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
APKExportData *ed = (APKExportData *)p_userdata;
|
APKExportData *ed = (APKExportData *)p_userdata;
|
||||||
|
@ -743,7 +743,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
|
||||||
if (!exported) {
|
if (!exported) {
|
||||||
String abis_string = String(" ").join(abis);
|
String abis_string = String(" ").join(abis);
|
||||||
String err = "Cannot determine ABI for library \"" + p_so.path + "\". One of the supported ABIs must be used as a tag: " + abis_string;
|
String err = "Cannot determine ABI for library \"" + p_so.path + "\". One of the supported ABIs must be used as a tag: " + abis_string;
|
||||||
ERR_PRINTS(err);
|
ERR_PRINT(err);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -2375,7 +2375,7 @@ public:
|
||||||
new_file += "//CHUNK_" + text + "_BEGIN\n";
|
new_file += "//CHUNK_" + text + "_BEGIN\n";
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
ERR_PRINTS("No end marker found in build.gradle for chunk: " + text);
|
ERR_PRINT("No end marker found in build.gradle for chunk: " + text);
|
||||||
f->seek(pos);
|
f->seek(pos);
|
||||||
} else {
|
} else {
|
||||||
//add chunk lines
|
//add chunk lines
|
||||||
|
@ -2414,7 +2414,7 @@ public:
|
||||||
new_file += "//DIR_" + text + "_BEGIN\n";
|
new_file += "//DIR_" + text + "_BEGIN\n";
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
ERR_PRINTS("No end marker found in build.gradle for dir: " + text);
|
ERR_PRINT("No end marker found in build.gradle for dir: " + text);
|
||||||
f->seek(pos);
|
f->seek(pos);
|
||||||
} else {
|
} else {
|
||||||
//add chunk lines
|
//add chunk lines
|
||||||
|
@ -2484,7 +2484,7 @@ public:
|
||||||
new_file += "<!--CHUNK_" + text + "_BEGIN-->\n";
|
new_file += "<!--CHUNK_" + text + "_BEGIN-->\n";
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
ERR_PRINTS("No end marker found in AndroidManifest.xml for chunk: " + text);
|
ERR_PRINT("No end marker found in AndroidManifest.xml for chunk: " + text);
|
||||||
f->seek(pos);
|
f->seek(pos);
|
||||||
} else {
|
} else {
|
||||||
//add chunk lines
|
//add chunk lines
|
||||||
|
@ -2507,7 +2507,7 @@ public:
|
||||||
String last_tag = "android:icon=\"@mipmap/icon\"";
|
String last_tag = "android:icon=\"@mipmap/icon\"";
|
||||||
int last_tag_pos = l.find(last_tag);
|
int last_tag_pos = l.find(last_tag);
|
||||||
if (last_tag_pos == -1) {
|
if (last_tag_pos == -1) {
|
||||||
ERR_PRINTS("Not adding application attributes as the expected tag was not found in '<application': " + last_tag);
|
ERR_PRINT("Not adding application attributes as the expected tag was not found in '<application': " + last_tag);
|
||||||
append_line = true;
|
append_line = true;
|
||||||
} else {
|
} else {
|
||||||
String base = l.substr(0, last_tag_pos + last_tag.length());
|
String base = l.substr(0, last_tag_pos + last_tag.length());
|
||||||
|
|
|
@ -1767,7 +1767,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
print_line("Creating " + dir_name);
|
print_line("Creating " + dir_name);
|
||||||
Error dir_err = tmp_app_path->make_dir_recursive(dir_name);
|
Error dir_err = tmp_app_path->make_dir_recursive(dir_name);
|
||||||
if (dir_err) {
|
if (dir_err) {
|
||||||
ERR_PRINTS("Can't create '" + dir_name + "'.");
|
ERR_PRINT("Can't create '" + dir_name + "'.");
|
||||||
unzClose(src_pkg_zip);
|
unzClose(src_pkg_zip);
|
||||||
memdelete(tmp_app_path);
|
memdelete(tmp_app_path);
|
||||||
return ERR_CANT_CREATE;
|
return ERR_CANT_CREATE;
|
||||||
|
@ -1777,7 +1777,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
/* write the file */
|
/* write the file */
|
||||||
FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
|
FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
ERR_PRINTS("Can't write '" + file + "'.");
|
ERR_PRINT("Can't write '" + file + "'.");
|
||||||
unzClose(src_pkg_zip);
|
unzClose(src_pkg_zip);
|
||||||
memdelete(tmp_app_path);
|
memdelete(tmp_app_path);
|
||||||
return ERR_CANT_CREATE;
|
return ERR_CANT_CREATE;
|
||||||
|
@ -1801,7 +1801,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
unzClose(src_pkg_zip);
|
unzClose(src_pkg_zip);
|
||||||
|
|
||||||
if (!found_library) {
|
if (!found_library) {
|
||||||
ERR_PRINTS("Requested template library '" + library_to_use + "' not found. It might be missing from your template archive.");
|
ERR_PRINT("Requested template library '" + library_to_use + "' not found. It might be missing from your template archive.");
|
||||||
memdelete(tmp_app_path);
|
memdelete(tmp_app_path);
|
||||||
return ERR_FILE_NOT_FOUND;
|
return ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
@ -1817,7 +1817,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
bool dir_exists = tmp_app_path->dir_exists(static_lib_path);
|
bool dir_exists = tmp_app_path->dir_exists(static_lib_path);
|
||||||
Error lib_copy_err = dir_exists ? tmp_app_path->copy_dir(static_lib_path, dest_lib_file_path) : tmp_app_path->copy(static_lib_path, dest_lib_file_path);
|
Error lib_copy_err = dir_exists ? tmp_app_path->copy_dir(static_lib_path, dest_lib_file_path) : tmp_app_path->copy(static_lib_path, dest_lib_file_path);
|
||||||
if (lib_copy_err != OK) {
|
if (lib_copy_err != OK) {
|
||||||
ERR_PRINTS("Can't copy '" + static_lib_path + "'.");
|
ERR_PRINT("Can't copy '" + static_lib_path + "'.");
|
||||||
memdelete(tmp_app_path);
|
memdelete(tmp_app_path);
|
||||||
return lib_copy_err;
|
return lib_copy_err;
|
||||||
}
|
}
|
||||||
|
@ -1886,7 +1886,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
String project_file_name = dest_dir + binary_name + ".xcodeproj/project.pbxproj";
|
String project_file_name = dest_dir + binary_name + ".xcodeproj/project.pbxproj";
|
||||||
FileAccess *f = FileAccess::open(project_file_name, FileAccess::WRITE);
|
FileAccess *f = FileAccess::open(project_file_name, FileAccess::WRITE);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
ERR_PRINTS("Can't write '" + project_file_name + "'.");
|
ERR_PRINT("Can't write '" + project_file_name + "'.");
|
||||||
return ERR_CANT_CREATE;
|
return ERR_CANT_CREATE;
|
||||||
};
|
};
|
||||||
f->store_buffer(project_file_data.ptr(), project_file_data.size());
|
f->store_buffer(project_file_data.ptr(), project_file_data.size());
|
||||||
|
|
|
@ -846,7 +846,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
||||||
EMSCRIPTEN_RESULT result;
|
EMSCRIPTEN_RESULT result;
|
||||||
#define EM_CHECK(ev) \
|
#define EM_CHECK(ev) \
|
||||||
if (result != EMSCRIPTEN_RESULT_SUCCESS) \
|
if (result != EMSCRIPTEN_RESULT_SUCCESS) \
|
||||||
ERR_PRINTS("Error while setting " #ev " callback: Code " + itos(result))
|
ERR_PRINT("Error while setting " #ev " callback: Code " + itos(result))
|
||||||
#define SET_EM_CALLBACK(target, ev, cb) \
|
#define SET_EM_CALLBACK(target, ev, cb) \
|
||||||
result = emscripten_set_##ev##_callback(target, NULL, true, &cb); \
|
result = emscripten_set_##ev##_callback(target, NULL, true, &cb); \
|
||||||
EM_CHECK(ev)
|
EM_CHECK(ev)
|
||||||
|
|
|
@ -756,7 +756,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
unzClose(src_pkg_zip);
|
unzClose(src_pkg_zip);
|
||||||
|
|
||||||
if (!found_binary) {
|
if (!found_binary) {
|
||||||
ERR_PRINTS("Requested template binary '" + binary_to_use + "' not found. It might be missing from your template archive.");
|
ERR_PRINT("Requested template binary '" + binary_to_use + "' not found. It might be missing from your template archive.");
|
||||||
err = ERR_FILE_NOT_FOUND;
|
err = ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3256,7 +3256,7 @@ void OS_OSX::run() {
|
||||||
quit = true;
|
quit = true;
|
||||||
}
|
}
|
||||||
} @catch (NSException *exception) {
|
} @catch (NSException *exception) {
|
||||||
ERR_PRINTS("NSException: " + String([exception reason].UTF8String));
|
ERR_PRINT("NSException: " + String([exception reason].UTF8String));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3326,7 +3326,7 @@ Error OS_OSX::move_to_trash(const String &p_path) {
|
||||||
NSError *err;
|
NSError *err;
|
||||||
|
|
||||||
if (![fm trashItemAtURL:url resultingItemURL:nil error:&err]) {
|
if (![fm trashItemAtURL:url resultingItemURL:nil error:&err]) {
|
||||||
ERR_PRINTS("trashItemAtURL error: " + String(err.localizedDescription.UTF8String));
|
ERR_PRINT("trashItemAtURL error: " + String(err.localizedDescription.UTF8String));
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1379,7 +1379,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FileAccess::exists(signtool_path)) {
|
if (!FileAccess::exists(signtool_path)) {
|
||||||
ERR_PRINTS("Could not find signtool executable at " + signtool_path + ", aborting.");
|
ERR_PRINT("Could not find signtool executable at " + signtool_path + ", aborting.");
|
||||||
return ERR_FILE_NOT_FOUND;
|
return ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1400,12 +1400,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FileAccess::exists(cert_path)) {
|
if (!FileAccess::exists(cert_path)) {
|
||||||
ERR_PRINTS("Could not find certificate file at " + cert_path + ", aborting.");
|
ERR_PRINT("Could not find certificate file at " + cert_path + ", aborting.");
|
||||||
return ERR_FILE_NOT_FOUND;
|
return ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cert_alg < 0 || cert_alg > 2) {
|
if (cert_alg < 0 || cert_alg > 2) {
|
||||||
ERR_PRINTS("Invalid certificate algorithm " + itos(cert_alg) + ", aborting.");
|
ERR_PRINT("Invalid certificate algorithm " + itos(cert_alg) + ", aborting.");
|
||||||
return ERR_INVALID_DATA;
|
return ERR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ void EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FileAccess::exists(rcedit_path)) {
|
if (!FileAccess::exists(rcedit_path)) {
|
||||||
ERR_PRINTS("Could not find rcedit executable at " + rcedit_path + ", no icon or app information data will be included.");
|
ERR_PRINT("Could not find rcedit executable at " + rcedit_path + ", no icon or app information data will be included.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ void EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset>
|
||||||
String wine_path = EditorSettings::get_singleton()->get("export/windows/wine");
|
String wine_path = EditorSettings::get_singleton()->get("export/windows/wine");
|
||||||
|
|
||||||
if (wine_path != String() && !FileAccess::exists(wine_path)) {
|
if (wine_path != String() && !FileAccess::exists(wine_path)) {
|
||||||
ERR_PRINTS("Could not find wine executable at " + wine_path + ", no icon or app information data will be included.");
|
ERR_PRINT("Could not find wine executable at " + wine_path + ", no icon or app information data will be included.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
|
||||||
#ifdef WINDOWS_ENABLED
|
#ifdef WINDOWS_ENABLED
|
||||||
String signtool_path = EditorSettings::get_singleton()->get("export/windows/signtool");
|
String signtool_path = EditorSettings::get_singleton()->get("export/windows/signtool");
|
||||||
if (signtool_path != String() && !FileAccess::exists(signtool_path)) {
|
if (signtool_path != String() && !FileAccess::exists(signtool_path)) {
|
||||||
ERR_PRINTS("Could not find signtool executable at " + signtool_path + ", aborting.");
|
ERR_PRINT("Could not find signtool executable at " + signtool_path + ", aborting.");
|
||||||
return ERR_FILE_NOT_FOUND;
|
return ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
if (signtool_path == String()) {
|
if (signtool_path == String()) {
|
||||||
|
@ -196,7 +196,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
|
||||||
#else
|
#else
|
||||||
String signtool_path = EditorSettings::get_singleton()->get("export/windows/osslsigncode");
|
String signtool_path = EditorSettings::get_singleton()->get("export/windows/osslsigncode");
|
||||||
if (signtool_path != String() && !FileAccess::exists(signtool_path)) {
|
if (signtool_path != String() && !FileAccess::exists(signtool_path)) {
|
||||||
ERR_PRINTS("Could not find osslsigncode executable at " + signtool_path + ", aborting.");
|
ERR_PRINT("Could not find osslsigncode executable at " + signtool_path + ", aborting.");
|
||||||
return ERR_FILE_NOT_FOUND;
|
return ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
if (signtool_path == String()) {
|
if (signtool_path == String()) {
|
||||||
|
|
|
@ -3519,7 +3519,7 @@ Error OS_Windows::move_to_trash(const String &p_path) {
|
||||||
delete[] from;
|
delete[] from;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ERR_PRINTS("SHFileOperation error: " + itos(ret));
|
ERR_PRINT("SHFileOperation error: " + itos(ret));
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3783,7 +3783,7 @@ Error OS_X11::move_to_trash(const String &p_path) {
|
||||||
|
|
||||||
// Issue an error if none of the previous locations is appropriate for the trash can.
|
// Issue an error if none of the previous locations is appropriate for the trash can.
|
||||||
if (trash_can == "") {
|
if (trash_can == "") {
|
||||||
ERR_PRINTS("move_to_trash: Could not determine the trash can location");
|
ERR_PRINT("move_to_trash: Could not determine the trash can location");
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3794,7 +3794,7 @@ Error OS_X11::move_to_trash(const String &p_path) {
|
||||||
|
|
||||||
// Issue an error if trash can is not created proprely.
|
// Issue an error if trash can is not created proprely.
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
ERR_PRINTS("move_to_trash: Could not create the trash can \"" + trash_can + "\"");
|
ERR_PRINT("move_to_trash: Could not create the trash can \"" + trash_can + "\"");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3808,7 +3808,7 @@ Error OS_X11::move_to_trash(const String &p_path) {
|
||||||
|
|
||||||
// Issue an error if "mv" failed to move the given resource to the trash can.
|
// Issue an error if "mv" failed to move the given resource to the trash can.
|
||||||
if (err != OK || retval != 0) {
|
if (err != OK || retval != 0) {
|
||||||
ERR_PRINTS("move_to_trash: Could not move the resource \"" + p_path + "\" to the trash can \"" + trash_can + "\"");
|
ERR_PRINT("move_to_trash: Could not move the resource \"" + p_path + "\" to the trash can \"" + trash_can + "\"");
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ void NavigationPolygon::make_polygons_from_outlines() {
|
||||||
|
|
||||||
TriangulatorPartition tpart;
|
TriangulatorPartition tpart;
|
||||||
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
|
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
|
||||||
ERR_PRINTS("NavigationPolygon: Convex partition failed!");
|
ERR_PRINT("NavigationPolygon: Convex partition failed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ void Skeleton::_update_process_order() {
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
if (bonesptr[i].parent >= len) {
|
if (bonesptr[i].parent >= len) {
|
||||||
//validate this just in case
|
//validate this just in case
|
||||||
ERR_PRINTS("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent));
|
ERR_PRINT("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent));
|
||||||
bonesptr[i].parent = -1;
|
bonesptr[i].parent = -1;
|
||||||
}
|
}
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
|
|
|
@ -488,7 +488,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
|
||||||
pa->object->set_indexed(pa->subpath, value, &valid); //you are not speshul
|
pa->object->set_indexed(pa->subpath, value, &valid); //you are not speshul
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
ERR_PRINTS("Failed setting track value '" + String(pa->owner->path) + "'. Check if property exists or the type of key is valid. Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
ERR_PRINT("Failed setting track value '" + String(pa->owner->path) + "'. Check if property exists or the type of key is valid. Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
|
||||||
case SP_NODE2D_POS: {
|
case SP_NODE2D_POS: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (value.get_type() != Variant::VECTOR2) {
|
if (value.get_type() != Variant::VECTOR2) {
|
||||||
ERR_PRINTS("Position key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not of type Vector2(). Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
ERR_PRINT("Position key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not of type Vector2(). Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
static_cast<Node2D *>(pa->object)->set_position(value);
|
static_cast<Node2D *>(pa->object)->set_position(value);
|
||||||
|
@ -504,7 +504,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
|
||||||
case SP_NODE2D_ROT: {
|
case SP_NODE2D_ROT: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (value.is_num()) {
|
if (value.is_num()) {
|
||||||
ERR_PRINTS("Rotation key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not numerical. Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
ERR_PRINT("Rotation key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not numerical. Animation '" + a->get_name() + "' at node '" + get_path() + "'.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
|
||||||
case SP_NODE2D_SCALE: {
|
case SP_NODE2D_SCALE: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (value.get_type() != Variant::VECTOR2) {
|
if (value.get_type() != Variant::VECTOR2) {
|
||||||
ERR_PRINTS("Scale key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not of type Vector2()." + a->get_name() + "' at node '" + get_path() + "'.");
|
ERR_PRINT("Scale key at time " + rtos(p_time) + " in Animation Track '" + String(pa->owner->path) + "' not of type Vector2()." + a->get_name() + "' at node '" + get_path() + "'.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -548,7 +548,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
|
||||||
ERR_CONTINUE(s > VARIANT_ARG_MAX);
|
ERR_CONTINUE(s > VARIANT_ARG_MAX);
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (!nc->node->has_method(method)) {
|
if (!nc->node->has_method(method)) {
|
||||||
ERR_PRINTS("Invalid method call '" + method + "'. '" + a->get_name() + "' at node '" + get_path() + "'.");
|
ERR_PRINT("Invalid method call '" + method + "'. '" + a->get_name() + "' at node '" + get_path() + "'.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
||||||
pa->object->set_indexed(pa->subpath, pa->value_accum, &valid); //you are not speshul
|
pa->object->set_indexed(pa->subpath, pa->value_accum, &valid); //you are not speshul
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
ERR_PRINTS("Failed setting key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "'. Check if property exists or the type of key is right for the property");
|
ERR_PRINT("Failed setting key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "'. Check if property exists or the type of key is right for the property");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
||||||
case SP_NODE2D_POS: {
|
case SP_NODE2D_POS: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (pa->value_accum.get_type() != Variant::VECTOR2) {
|
if (pa->value_accum.get_type() != Variant::VECTOR2) {
|
||||||
ERR_PRINTS("Position key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not of type Vector2()");
|
ERR_PRINT("Position key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not of type Vector2()");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
static_cast<Node2D *>(pa->object)->set_position(pa->value_accum);
|
static_cast<Node2D *>(pa->object)->set_position(pa->value_accum);
|
||||||
|
@ -883,7 +883,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
||||||
case SP_NODE2D_ROT: {
|
case SP_NODE2D_ROT: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (pa->value_accum.is_num()) {
|
if (pa->value_accum.is_num()) {
|
||||||
ERR_PRINTS("Rotation key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not numerical");
|
ERR_PRINT("Rotation key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not numerical");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -892,7 +892,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
||||||
case SP_NODE2D_SCALE: {
|
case SP_NODE2D_SCALE: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (pa->value_accum.get_type() != Variant::VECTOR2) {
|
if (pa->value_accum.get_type() != Variant::VECTOR2) {
|
||||||
ERR_PRINTS("Scale key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not of type Vector2()");
|
ERR_PRINT("Scale key at time " + rtos(playback.current.pos) + " in Animation '" + get_current_animation() + "' at Node '" + get_path() + "', Track '" + String(pa->owner->path) + "' not of type Vector2()");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -559,7 +559,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
|
||||||
Node *child = parent->get_node_and_resource(path, resource, leftover_path);
|
Node *child = parent->get_node_and_resource(path, resource, leftover_path);
|
||||||
|
|
||||||
if (!child) {
|
if (!child) {
|
||||||
ERR_PRINTS("AnimationTree: '" + String(E->get()) + "', couldn't resolve track: '" + String(path) + "'");
|
ERR_PRINT("AnimationTree: '" + String(E->get()) + "', couldn't resolve track: '" + String(path) + "'");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
|
||||||
Spatial *spatial = Object::cast_to<Spatial>(child);
|
Spatial *spatial = Object::cast_to<Spatial>(child);
|
||||||
|
|
||||||
if (!spatial) {
|
if (!spatial) {
|
||||||
ERR_PRINTS("AnimationTree: '" + String(E->get()) + "', transform track does not point to spatial: '" + String(path) + "'");
|
ERR_PRINT("AnimationTree: '" + String(E->get()) + "', transform track does not point to spatial: '" + String(path) + "'");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por
|
||||||
};
|
};
|
||||||
|
|
||||||
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
|
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
|
||||||
ERR_PRINTS("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + ".");
|
ERR_PRINT("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + ".");
|
||||||
return FAILED;
|
return FAILED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2096,7 +2096,7 @@ SceneTree::SceneTree() {
|
||||||
ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
|
ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
|
||||||
} else {
|
} else {
|
||||||
//file was erased, notify user.
|
//file was erased, notify user.
|
||||||
ERR_PRINTS(RTR("Default Environment as specified in Project Settings (Rendering -> Environment -> Default Environment) could not be loaded."));
|
ERR_PRINT(RTR("Default Environment as specified in Project Settings (Rendering -> Environment -> Default Environment) could not be loaded."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,7 +752,7 @@ void register_scene_types() {
|
||||||
if (font_path != String()) {
|
if (font_path != String()) {
|
||||||
font = ResourceLoader::load(font_path);
|
font = ResourceLoader::load(font_path);
|
||||||
if (!font.is_valid()) {
|
if (!font.is_valid()) {
|
||||||
ERR_PRINTS("Error loading custom font '" + font_path + "'");
|
ERR_PRINT("Error loading custom font '" + font_path + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ void register_scene_types() {
|
||||||
Theme::set_default_font(font);
|
Theme::set_default_font(font);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS("Error loading custom theme '" + theme_path + "'");
|
ERR_PRINT("Error loading custom theme '" + theme_path + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1328,7 +1328,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
|
||||||
|
|
||||||
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
|
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
|
||||||
if (res->get_path() == local_path) {
|
if (res->get_path() == local_path) {
|
||||||
ERR_PRINTS("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
|
ERR_PRINT("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int index = external_resources.size();
|
int index = external_resources.size();
|
||||||
|
|
|
@ -117,7 +117,7 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) {
|
||||||
obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce);
|
obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce);
|
||||||
if (ce.error != Variant::CallError::CALL_OK) {
|
if (ce.error != Variant::CallError::CALL_OK) {
|
||||||
String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce);
|
String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce);
|
||||||
ERR_PRINTS("Error calling frame drawn function: " + err);
|
ERR_PRINT("Error calling frame drawn function: " + err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue