mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 14:51:27 +00:00
Improves caught exception logging
Also refactors away "log_runtime" config var to use its name for a helper proc
This commit is contained in:
@@ -102,3 +102,17 @@ var/total_runtimes_skipped = 0
|
||||
error_cache.logError(e, desclines, e_src = e_src)
|
||||
|
||||
#endif
|
||||
|
||||
/proc/log_runtime(exception/e, datum/e_src, extra_info)
|
||||
if(!istype(e))
|
||||
world.Error(e, e_src)
|
||||
return
|
||||
|
||||
if(extra_info)
|
||||
// Adding extra info adds two newlines, because parsing runtimes is funky
|
||||
if(islist(extra_info))
|
||||
e.desc = " [jointext(extra_info, "\n ")]\n\n" + e.desc
|
||||
else
|
||||
e.desc = " [extra_info]\n\n" + e.desc
|
||||
|
||||
world.Error(e, e_src)
|
||||
|
||||
Reference in New Issue
Block a user