diff options
| author | Rémi Verschelde | 2018-02-21 09:07:47 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2018-02-21 09:07:59 +0100 |
| commit | 57d562b394730649266f902db63d63b448dc1d6e (patch) | |
| tree | 18fb01c40f30023c7819093725c44ca8e87f0093 /core/project_settings.cpp | |
| parent | 53a2b0a5cec83628474b5f95312fd008e7c213ef (diff) | |
| download | godot-57d562b394730649266f902db63d63b448dc1d6e.tar.gz godot-57d562b394730649266f902db63d63b448dc1d6e.tar.zst godot-57d562b394730649266f902db63d63b448dc1d6e.zip | |
Diffstat (limited to 'core/project_settings.cpp')
| -rw-r--r-- | core/project_settings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp index b7fd6d731..427fa77e6 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -453,8 +453,11 @@ Error ProjectSettings::_load_settings_text(const String p_path) { Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); - if (!f) - return ERR_CANT_OPEN; + if (!f) { + // FIXME: Above 'err' error code is ERR_FILE_CANT_OPEN if the file is missing + // This needs to be streamlined if we want decent error reporting + return ERR_FILE_NOT_FOUND; + } VariantParser::StreamFile stream; stream.f = f; @@ -513,6 +516,7 @@ Error ProjectSettings::_load_settings_text_or_binary(const String p_text_path, c return OK; } else if (err_text != ERR_FILE_NOT_FOUND) { // If the text-based file exists but can't be loaded, we want to know it + ERR_PRINTS("Couldn't load file '" + p_text_path + "', error code " + itos(err_text) + "."); return err_text; } |
