Skip to content

Commit 651a81d

Browse files
authored
Don't avoid exception wrapping on HL/neko/eval (#12049)
* don't avoid exception wrapping on Eval/Neko/HL closes #12047 * fine
1 parent eb8f9d0 commit 651a81d

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

src/context/common.ml

+9
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,9 @@ let get_config com =
650650
pf_supports_unicode = false;
651651
pf_scoping = { default_config.pf_scoping with
652652
vs_flags = [ReserveAllTopLevelSymbols];
653+
};
654+
pf_exceptions = { default_config.pf_exceptions with
655+
ec_avoid_wrapping = false
653656
}
654657
}
655658
| Flash ->
@@ -770,6 +773,9 @@ let get_config com =
770773
vs_scope = BlockScope;
771774
vs_flags = [NoShadowing]
772775
};
776+
pf_exceptions = { default_config.pf_exceptions with
777+
ec_avoid_wrapping = false
778+
}
773779
}
774780
| Eval ->
775781
{
@@ -779,6 +785,9 @@ let get_config com =
779785
pf_uses_utf16 = false;
780786
pf_supports_threads = true;
781787
pf_capture_policy = CPWrapRef;
788+
pf_exceptions = { default_config.pf_exceptions with
789+
ec_avoid_wrapping = false
790+
}
782791
}
783792

784793
let memory_marker = [|Unix.time()|]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Main.hx:3: characters 15-30 : Cannot use Void as value
1+
Main.hx:3: characters 15-30 : Void should be Any
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package unit.issues;
2+
3+
import utest.Assert;
4+
5+
class Issue12047 extends Test {
6+
static function test() {
7+
try {
8+
throwCatchWrap();
9+
} catch (err:Issue12047) {
10+
trace(err);
11+
} catch (e) {
12+
Assert.pass();
13+
}
14+
}
15+
16+
static function throwCatchWrap() {
17+
try {
18+
throw "fatal";
19+
} catch (e) {
20+
throw e;
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)