@ getStackTrace()

Within the context of a catch block, this function will return a trace of the Sleep call stack that caused the caught exception condition to occur. Returns an empty array otherwise.


An array of sleep.runtime.ScriptInstance$SleepStackElement objects. They have a decent String representation if you choose to utilize that.

Side Effects / Notes


sub bar { throw "I chose to do this :)"; } sub foo { bar(); } try { foo(); } catch $exception { warn("Error is: $exception"); printAll(getStackTrace()); }

Warning: Error is: I chose to do this :) at &foo() &bar() <origin of exception>

See Also