Improve error reporting of ProjectSettings::setup()

And use it to better report errors in the console and project manager
when a project.godot file is corrupted.

Fixes #14963.
This commit is contained in:
Rémi Verschelde
2018-02-19 14:53:59 +01:00
parent 4faf81977d
commit 7839076f95
3 changed files with 58 additions and 31 deletions

View File

@ -93,8 +93,9 @@ protected:
static ProjectSettings *singleton;
Error _load_settings(const String p_path);
Error _load_settings_text(const String p_path);
Error _load_settings_binary(const String p_path);
Error _load_settings_text_or_binary(const String p_text_path, const String p_bin_path);
Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());