mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 02:13:36 +00:00
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
This commit is contained in:
commit
dec10dd776
125 changed files with 435 additions and 458 deletions
|
|
@ -1973,7 +1973,7 @@ Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error
|
|||
Ref<TextFile> text_res(text_file);
|
||||
Error err = text_file->load_text(path);
|
||||
|
||||
ERR_FAIL_COND_V(err != OK, RES());
|
||||
ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot load text file '" + path + "'.");
|
||||
|
||||
text_file->set_file_path(local_path);
|
||||
text_file->set_path(local_path, true);
|
||||
|
|
@ -1998,10 +1998,7 @@ Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_p
|
|||
Error err;
|
||||
FileAccess *file = FileAccess::open(p_path, FileAccess::WRITE, &err);
|
||||
|
||||
if (err) {
|
||||
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
}
|
||||
ERR_FAIL_COND_V_MSG(err, err, "Cannot save text file '" + p_path + "'.");
|
||||
|
||||
file->store_string(source);
|
||||
if (file->get_error() != OK && file->get_error() != ERR_FILE_EOF) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue