File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1212
1313# 12.0.0-alpha.11 (Unreleased)
1414
15+ #### :bug : Bug fix
16+
17+ - Fix ` Error.fromException ` . https://github.com/rescript-lang/rescript/pull/7364
18+
19+ # 12.0.0-alpha.10
20+
1521#### :rocket : New Feature
1622
1723- Add ` Dict.has ` and double ` Dict.forEachWithKey ` /` Dict.mapValues ` performance. https://github.com/rescript-lang/rescript/pull/7316
Original file line number Diff line number Diff line change 11
22
3+ import * as Stdlib_Exn from "./Stdlib_Exn.js" ;
34import * as Primitive_option from "./Primitive_option.js" ;
45
56function fromException ( exn ) {
6- if ( exn . TAG === "Ok" ) {
7- return ;
8- } else {
9- return Primitive_option . some ( exn . _0 ) ;
7+ if ( exn . RE_EXN_ID === Stdlib_Exn . $$Error ) {
8+ return Primitive_option . some ( exn . _1 ) ;
109 }
10+
1111}
1212
1313let $$EvalError = { } ;
Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ let Stdlib_Exn = require ( "./Stdlib_Exn.js" ) ;
34let Primitive_option = require ( "./Primitive_option.js" ) ;
45
56function fromException ( exn ) {
6- if ( exn . TAG === "Ok" ) {
7- return ;
8- } else {
9- return Primitive_option . some ( exn . _0 ) ;
7+ if ( exn . RE_EXN_ID === Stdlib_Exn . $$Error ) {
8+ return Primitive_option . some ( exn . _1 ) ;
109 }
10+
1111}
1212
1313let $$EvalError = { } ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ type t = Stdlib_Exn.t
22
33let fromException : exn => option <t > = exn =>
44 switch Obj .magic (exn ) {
5- | Error (t ) => Some (t )
5+ | Stdlib_Exn . Error (t ) => Some (t )
66 | _ => None
77 }
88external toException : t => exn = "%identity"
You can’t perform that action at this time.
0 commit comments