mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Added some obvious errors explanations
This commit is contained in:
parent
e9f49a6d5a
commit
17732fe698
125 changed files with 435 additions and 458 deletions
|
@ -1965,7 +1965,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);
|
||||
|
@ -1990,10 +1990,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