Merge pull request #34213 from MrStonedOne/gibstacktrace

[ready] Adds a system to get a stack trace as a list.
This commit is contained in:
Jordan Brown
2018-01-18 23:44:37 -05:00
committed by CitadelStationBot
parent c545dc2f79
commit 9478478ca1
2 changed files with 13 additions and 0 deletions

View File

@@ -20,6 +20,11 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
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.
if (islist(stack_trace_storage))
for (var/line in splittext(E.desc, "\n"))
if (text2ascii(line) != 32)
stack_trace_storage += line
var/static/list/error_last_seen = list()
var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error)
If negative, starts at -1, and goes down by 1 each time that error gets skipped*/