diff options
Diffstat (limited to 'platform/uwp')
-rw-r--r-- | platform/uwp/export/export.cpp | 12 | ||||
-rw-r--r-- | platform/uwp/os_uwp.cpp | 9 |
2 files changed, 6 insertions, 15 deletions
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 75ce422e9e..024e7f1916 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -901,8 +901,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform { String err_string = "Couldn't save temp logo file."; EditorNode::add_io_error(err_string); - ERR_EXPLAIN(err_string); - ERR_FAIL_V(data); + ERR_FAIL_V_MSG(data, err_string); } FileAccess *f = FileAccess::open(tmp_path, FileAccess::READ, &err); @@ -912,8 +911,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform { String err_string = "Couldn't open temp logo file."; EditorNode::add_io_error(err_string); - ERR_EXPLAIN(err_string); - ERR_FAIL_V(data); + ERR_FAIL_V_MSG(data, err_string); } data.resize(f->get_len()); @@ -930,8 +928,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform { String err_string = "Couldn't open temp path to remove temp logo file."; EditorNode::add_io_error(err_string); - ERR_EXPLAIN(err_string); - ERR_FAIL_V(data); + ERR_FAIL_V_MSG(data, err_string); } err = dir->remove(tmp_path); @@ -943,8 +940,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform { String err_string = "Couldn't remove temp logo file."; EditorNode::add_io_error(err_string); - ERR_EXPLAIN(err_string); - ERR_FAIL_V(data); + ERR_FAIL_V_MSG(data, err_string); } return data; diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 9d9be44ce5..60f2290355 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -835,11 +835,7 @@ Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, String full_path = "game/" + p_path; p_library_handle = (void *)LoadPackagedLibrary(full_path.c_str(), 0); - - if (!p_library_handle) { - ERR_EXPLAIN("Can't open dynamic library: " + full_path + ". Error: " + format_error_message(GetLastError())); - ERR_FAIL_V(ERR_CANT_OPEN); - } + ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + full_path + ", error: " + format_error_message(GetLastError()) + "."); return OK; } @@ -854,8 +850,7 @@ Error OS_UWP::get_dynamic_library_symbol_handle(void *p_library_handle, const St p_symbol_handle = (void *)GetProcAddress((HMODULE)p_library_handle, p_name.utf8().get_data()); if (!p_symbol_handle) { if (!p_optional) { - ERR_EXPLAIN("Can't resolve symbol " + p_name + ". Error: " + String::num(GetLastError())); - ERR_FAIL_V(ERR_CANT_RESOLVE); + ERR_FAIL_V_MSG(ERR_CANT_RESOLVE, "Can't resolve symbol " + p_name + ", error: " + String::num(GetLastError()) + "."); } else { return ERR_CANT_RESOLVE; } |