diff options
| author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-11-06 08:38:23 +0100 |
|---|---|---|
| committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-11-06 10:29:53 +0100 |
| commit | 24469d9ce44d449e574fc1bc7f854f790866a178 (patch) | |
| tree | d84e034fa1e9ed00440b4d2b53f80b0a4e6a01c4 /core/error_macros.cpp | |
| parent | 245c99175c242bdc60a212cc84986b1a9ad5aa08 (diff) | |
| download | redot-engine-24469d9ce44d449e574fc1bc7f854f790866a178.tar.gz | |
Remove implicit dependency on String from error_macros.h.
Diffstat (limited to 'core/error_macros.cpp')
| -rw-r--r-- | core/error_macros.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/error_macros.cpp b/core/error_macros.cpp index 0e8e4a9bb4..eda6b9cbbb 100644 --- a/core/error_macros.cpp +++ b/core/error_macros.cpp @@ -31,6 +31,7 @@ #include "error_macros.h" #include "core/io/logger.h" +#include "core/ustring.h" #include "os/os.h" bool _err_error_exists = false; @@ -42,6 +43,11 @@ void _err_set_last_error(const char *p_err) { OS::get_singleton()->set_last_error(p_err); } +void _err_set_last_error(const String &p_err) { + + _err_set_last_error(p_err.utf8().get_data()); +} + void _err_clear_last_error() { OS::get_singleton()->clear_last_error(); @@ -99,6 +105,10 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co } } +void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, ErrorHandlerType p_type) { + _err_print_error(p_function, p_file, p_line, p_error.utf8().get_data(), p_type); +} + void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, bool fatal) { String fstr(fatal ? "FATAL: " : ""); |
