| 80 | } |
| 81 | |
| 82 | void remove_error_handler(const ErrorHandlerList *p_handler) { |
| 83 | _global_lock(); |
| 84 | |
| 85 | ErrorHandlerList *prev = nullptr; |
| 86 | ErrorHandlerList *l = error_handler_list; |
| 87 | |
| 88 | while (l) { |
| 89 | if (l == p_handler) { |
| 90 | if (prev) { |
| 91 | prev->next = l->next; |
| 92 | } else { |
| 93 | error_handler_list = l->next; |
| 94 | } |
| 95 | break; |
| 96 | } |
| 97 | prev = l; |
| 98 | l = l->next; |
| 99 | } |
| 100 | |
| 101 | _global_unlock(); |
| 102 | } |
| 103 | |
| 104 | // Errors without messages. |
| 105 | void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, bool p_editor_notify, ErrorHandlerType p_type) { |