summaryrefslogtreecommitdiff
path: root/core/error_macros.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/error_macros.cpp')
-rw-r--r--core/error_macros.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/core/error_macros.cpp b/core/error_macros.cpp
index 5de070844a..ff50c9786a 100644
--- a/core/error_macros.cpp
+++ b/core/error_macros.cpp
@@ -37,7 +37,6 @@
static ErrorHandlerList *error_handler_list = nullptr;
void add_error_handler(ErrorHandlerList *p_handler) {
-
_global_lock();
p_handler->next = error_handler_list;
error_handler_list = p_handler;
@@ -45,16 +44,13 @@ void add_error_handler(ErrorHandlerList *p_handler) {
}
void remove_error_handler(ErrorHandlerList *p_handler) {
-
_global_lock();
ErrorHandlerList *prev = nullptr;
ErrorHandlerList *l = error_handler_list;
while (l) {
-
if (l == p_handler) {
-
if (prev)
prev->next = l->next;
else
@@ -77,13 +73,11 @@ 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 char *p_error, const char *p_message, ErrorHandlerType p_type) {
-
OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, (Logger::ErrorType)p_type);
_global_lock();
ErrorHandlerList *l = error_handler_list;
while (l) {
-
l->errfunc(l->userdata, p_function, p_file, p_line, p_error, p_message, p_type);
l = l->next;
}
@@ -104,7 +98,6 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
}
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, const char *p_message, bool fatal) {
-
String fstr(fatal ? "FATAL: " : "");
String err(fstr + "Index " + p_index_str + " = " + itos(p_index) + " is out of bounds (" + p_size_str + " = " + itos(p_size) + ").");
_err_print_error(p_function, p_file, p_line, err.utf8().get_data(), p_message);