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