Update error_handler.dm

This commit is contained in:
CHOMPStation2
2020-07-18 20:28:41 -07:00
committed by GitHub
parent a80cc3b74c
commit 1da2e0ee9d

View File

@@ -12,16 +12,16 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
log_error("\[[time_stamp()]] Uncaught exception: [e]")
return ..()
//CHOMP Edit Stealing this bit from TGS to try to record OOM issues.
//CHOMP Edit Stealing this bit from TGStation to try to record OOM issues.
//this is snowflake because of a byond bug (ID:2306577), do not attempt to call non-builtin procs in this if
if(copytext(E.name,1,32) == "Maximum recursion level reached")
if(copytext(e.name,1,32) == "Maximum recursion level reached")
//log to world while intentionally triggering the byond bug.
log_world("runtime error: [E.name]\n[E.desc]")
log_world("runtime error: [e.name]\n[e.desc]")
//if we got to here without silently ending, the byond bug has been fixed.
log_world("The bug with recursion runtimes has been fixed. Please remove the snowflake check from world/Error in [__FILE__]:[__LINE__]")
return //this will never happen.
else if(copytext(E.name,1,18) == "Out of resources!")
else if(copytext(e.name,1,18) == "Out of resources!")
log_world("BYOND out of memory.")
log_game("BYOND out of memory.")
return ..()