mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
This commit is contained in:
committed by
Rémi Verschelde
parent
40640a01dc
commit
71d71d55b5
@@ -214,13 +214,11 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) {
|
||||
Ref<Script> s = res;
|
||||
StringName ibt = s->get_instance_base_type();
|
||||
bool valid_type = ClassDB::is_parent_class(ibt, "ResourceFormatSaver");
|
||||
ERR_EXPLAIN("Script does not inherit a CustomResourceSaver: " + script_path);
|
||||
ERR_FAIL_COND_V(!valid_type, false);
|
||||
ERR_FAIL_COND_V_MSG(!valid_type, false, "Script does not inherit a CustomResourceSaver: " + script_path + ".");
|
||||
|
||||
Object *obj = ClassDB::instance(ibt);
|
||||
|
||||
ERR_EXPLAIN("Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt));
|
||||
ERR_FAIL_COND_V(obj == NULL, false);
|
||||
ERR_FAIL_COND_V_MSG(obj == NULL, false, "Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt) + ".");
|
||||
|
||||
ResourceFormatSaver *crl = Object::cast_to<ResourceFormatSaver>(obj);
|
||||
crl->set_script(s.get_ref_ptr());
|
||||
|
||||
Reference in New Issue
Block a user