Files
Bubberstation/code/__HELPERS/stack_trace.dm
SkyratBot 24d4bf1e6b [MIRROR] Add file and line to stack_trace [MDB IGNORE] (#16321)
* Add file and line to stack_trace (#70003)

Add file and line to stack_trace

* Add file and line to stack_trace

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-09-19 22:15:44 -07:00

13 lines
441 B
Plaintext

/// gives us the stack trace from CRASH() without ending the current proc.
/// Do not call directly, use the [stack_trace] macro instead.
/proc/_stack_trace(message, file, line)
CRASH("[message] ([file]:[line])")
GLOBAL_REAL_VAR(list/stack_trace_storage)
/proc/gib_stack_trace()
stack_trace_storage = list()
stack_trace("")
stack_trace_storage.Cut(1, min(3,stack_trace_storage.len))
. = stack_trace_storage
stack_trace_storage = null