Commit 9ca493cc by Kim Nguyễn

Fix an internal uncaught exception when opening an unknown compilation unit from the toplevel.

parent 9010aa75
......@@ -302,9 +302,12 @@ let do_open env cu =
let type_open env loc ids =
match find_global env loc ids with
| ECDuce cu -> do_open env cu
| _ -> error loc "This path does not refer to a CDuce unit"
try
match find_global env loc ids with
| ECDuce cu -> do_open env cu
| _ -> error loc "This path does not refer to a CDuce unit"
with
Not_found -> error loc "Unknown CDuce unit"
module IType = struct
open Typepat
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment