@@ -13,6 +13,7 @@
macro : added return type hint to haxe.macro.MacroStringTools.formatString (#9928)
cs : fixed catching exceptions from static closures (#9957)
eval : fixed `Std.random(arg)` for `arg` values of more than 30 bits (#9974)
+ js : fixed `haxe.CallStack.exceptionStack` (#9968)
2020-09-11 4.1.4:
@@ -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