This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
17
unikernel/duniverse/ppxlib/test/location/exception/test.ml
Normal file
17
unikernel/duniverse/ppxlib/test/location/exception/test.ml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
open Ppxlib.Location
|
||||
|
||||
let catch_as_compiler_exception =
|
||||
try raise_errorf ~loc:none "foo" with
|
||||
| Ocaml_common.Location.Error _ -> "caught"
|
||||
| _ -> "uncaught"
|
||||
[%%expect{|
|
||||
val catch_as_compiler_exception : string = "caught"
|
||||
|}]
|
||||
|
||||
let catch_as_ppxlib_exception =
|
||||
try raise_errorf ~loc:none "foo" with
|
||||
| Error _ -> "caught"
|
||||
| _ -> "uncaught"
|
||||
[%%expect{|
|
||||
val catch_as_ppxlib_exception : string = "caught"
|
||||
|}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue