|
@@ -56,12 +56,13 @@ abstract CallStack(Array<StackItem>) from Array<StackItem> {
|
|
|
Return the exception stack : this is the stack elements between
|
|
|
the place the last exception was thrown and the place it was
|
|
|
caught, or an empty array if not available.
|
|
|
+ Set `fullStack` parameter to true in order to return the full exception stack.
|
|
|
|
|
|
May not work if catch type was a derivative from `haxe.Exception`.
|
|
|
**/
|
|
|
- public static function exceptionStack():Array<StackItem> {
|
|
|
+ public static function exceptionStack( fullStack = false ):Array<StackItem> {
|
|
|
var eStack:CallStack = NativeStackTrace.toHaxe(NativeStackTrace.exceptionStack());
|
|
|
- return eStack.subtract(callStack()).asArray();
|
|
|
+ return (fullStack ? eStack : eStack.subtract(callStack())).asArray();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -181,4 +182,4 @@ abstract CallStack(Array<StackItem>) from Array<StackItem> {
|
|
|
b.add(n);
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|