aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toplevel/vernacentries.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 39e74dc44c..420a4bf027 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -363,7 +363,11 @@ let _ =
(function
| [VARG_QUALID qid] ->
fun () ->
- let fullname = Nametab.locate_loaded_library qid in
+ let fullname =
+ try Nametab.locate_loaded_library qid
+ with Not_found ->
+ error ((Nametab.string_of_qualid qid)^" not loaded")
+ in
without_mes_ambig Library.import_module fullname
| _ -> bad_vernac_args "ImportModule")