@@ -63,7 +63,22 @@ let raisesLibTable : (Name.t, Exceptions.t) Hashtbl.t =
63
63
(" fromStringOrThrow" , [invalidArgument]);
64
64
]
65
65
in
66
- let stdlibError = [(" raise" , [jsExn])] in
66
+ let stdlibJsError =
67
+ [
68
+ (" EvalError.throwWithMessage" , [jsExn]);
69
+ (" RangeError.throwWithMessage" , [jsExn]);
70
+ (" ReferenceError.throwWithMessage" , [jsExn]);
71
+ (" SyntaxError.throwWithMessage" , [jsExn]);
72
+ (" TypeError.throwWithMessage" , [jsExn]);
73
+ (" URIError.throwWithMessage" , [jsExn]);
74
+ (" panic" , [jsExn]);
75
+ (" throw" , [jsExn]);
76
+ (" throwWithMessage" , [jsExn]);
77
+ ]
78
+ in
79
+ let stdlibError =
80
+ [(" raise" , [jsExn]); (" panic" , [jsExn]); (" throw" , [jsExn])]
81
+ in
67
82
let stdlibExn =
68
83
[
69
84
(" raiseError" , [jsExn]);
@@ -156,6 +171,7 @@ let raisesLibTable : (Name.t, Exceptions.t) Hashtbl.t =
156
171
(" Bool" , stdlibBool);
157
172
(" Error" , stdlibError);
158
173
(" Exn" , stdlibExn);
174
+ (" JsError" , stdlibJsError);
159
175
(" Js.Json" , [(" parseExn" , [jsExn])]);
160
176
(" JSON" , stdlibJson);
161
177
(" Json_decode" , bsJson);
@@ -178,6 +194,8 @@ let raisesLibTable : (Name.t, Exceptions.t) Hashtbl.t =
178
194
(" Stdlib.Error" , stdlibError);
179
195
(" Stdlib_Exn" , stdlibExn);
180
196
(" Stdlib.Exn" , stdlibExn);
197
+ (" Stdlib_JsError" , stdlibJsError);
198
+ (" Stdlib.JsError" , stdlibJsError);
181
199
(" Stdlib_JSON" , stdlibJson);
182
200
(" Stdlib.JSON" , stdlibJson);
183
201
(" Stdlib_List" , stdlibList);
0 commit comments