This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View 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"
|}]