File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed 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