Files
Citadel-Station-13-RP/code/__HELPERS/stack_trace.dm
Zandario ed05e01a95 __HELPERS Cleaning and other things I decided to do. (#4584)
* Schizoposting

* The Crungly

* Tabbin' the JSON y'all

* Strings
2022-10-21 01:56:59 -07:00

15 lines
449 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