Core: Unify display of error type prefixes

This commit is contained in:
Danil Alexeev
2025-05-05 19:08:19 +03:00
parent 8f87e60307
commit 24494d840e
13 changed files with 102 additions and 152 deletions

View File

@@ -46,29 +46,9 @@ void TerminalLoggerAppleEmbedded::log_error(const char *p_function, const char *
err_details = p_code;
}
switch (p_type) {
case ERR_WARNING:
os_log_error(OS_LOG_DEFAULT,
"WARNING: %{public}s\nat: %{public}s (%{public}s:%i)",
err_details, p_function, p_file, p_line);
break;
case ERR_SCRIPT:
os_log_error(OS_LOG_DEFAULT,
"SCRIPT ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
err_details, p_function, p_file, p_line);
break;
case ERR_SHADER:
os_log_error(OS_LOG_DEFAULT,
"SHADER ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
err_details, p_function, p_file, p_line);
break;
case ERR_ERROR:
default:
os_log_error(OS_LOG_DEFAULT,
"ERROR: %{public}s\nat: %{public}s (%{public}s:%i)",
err_details, p_function, p_file, p_line);
break;
}
os_log_error(OS_LOG_DEFAULT,
"%{public}s: %{public}s\nat: %{public}s (%{public}s:%i)",
error_type_string(p_type), err_details, p_function, p_file, p_line);
for (const Ref<ScriptBacktrace> &backtrace : p_script_backtraces) {
if (!backtrace->is_empty()) {