Skip to content

Commit

Permalink
Merge pull request #85 from ocaml-ppx/ps/rr/refactor__use_raise_error…
Browse files Browse the repository at this point in the history
…_in_more_places
  • Loading branch information
tatchi authored Feb 10, 2023
2 parents 056ef45 + 5f7922d commit bdcee74
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/ppx_import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,8 @@ let module_type ~tool_name ~input_name (package_type : Ppxlib.package_type) =
in
Ast_helper.Mty.mk ~attrs:[] (Pmty_signature psig)
| {mtd_type = None; _} ->
let ext =
Ppxlib.Location.error_extensionf ~loc
"Imported module is abstract"
in
Ast_builder.Default.pmty_extension ~loc ext
| _ ->
let ext =
Ppxlib.Location.error_extensionf ~loc
"Imported module is indirectly defined"
in
Ast_builder.Default.pmty_extension ~loc ext )
raise_error ~loc "Imported module is abstract"
| _ -> raise_error ~loc "Imported module is indirectly defined" )
with Error {loc; error} ->
let ext = Ppxlib.Location.error_extensionf ~loc "%s" error in
Ast_builder.Default.pmty_extension ~loc ext
Expand Down

0 comments on commit bdcee74

Please sign in to comment.