@@ -97,6 +97,7 @@ class Exception extends NativeException {
return __nativeException;
}
+ @:ifFeature('haxe.NativeStackTrace.exceptionStack')
function get_stack():CallStack {
return switch __exceptionStack {
case null:
@@ -0,0 +1,17 @@
+class Main {
+ static function main() {
+ try {
+ test();
+ }
+ catch (e:Dynamic) {
+ var stack = haxe.CallStack.exceptionStack();
+ if(stack.length == 0) {
+ throw 'haxe.CallStack.exceptionStack() returned empty array';
+
+ static public function test() {
+ throw 'sdffsd';
+}
@@ -0,0 +1,5 @@
+--main Main
+--dce full
+--js bin/test.js
+--cmd node bin/test.js