File tree 4 files changed +15
-9
lines changed
4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 12
12
13
13
# 12.0.0-alpha.11 (Unreleased)
14
14
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
+
15
21
#### :rocket : New Feature
16
22
17
23
- 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 1
1
2
2
3
+ import * as Stdlib_Exn from "./Stdlib_Exn.js" ;
3
4
import * as Primitive_option from "./Primitive_option.js" ;
4
5
5
6
function 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 ) ;
10
9
}
10
+
11
11
}
12
12
13
13
let $$EvalError = { } ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ let Stdlib_Exn = require ( "./Stdlib_Exn.js" ) ;
3
4
let Primitive_option = require ( "./Primitive_option.js" ) ;
4
5
5
6
function 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 ) ;
10
9
}
10
+
11
11
}
12
12
13
13
let $$EvalError = { } ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ type t = Stdlib_Exn.t
2
2
3
3
let fromException : exn => option <t > = exn =>
4
4
switch Obj .magic (exn ) {
5
- | Error (t ) => Some (t )
5
+ | Stdlib_Exn . Error (t ) => Some (t )
6
6
| _ => None
7
7
}
8
8
external toException : t => exn = "%identity"
You can’t perform that action at this time.
0 commit comments