- | NCicTypeChecker.AssertFailure s
- | NCicTypeChecker.TypeCheckerFailure s
- | NCicEnvironment.ObjectNotFound s
- | NCicEnvironment.BadDependency s as e ->
- prerr_endline ("######### " ^ Lazy.force s);
- if not ignore_exc then raise e
+ exn ->
+ let rec aux = function
+ | NCicTypeChecker.AssertFailure s
+ | NCicTypeChecker.TypeCheckerFailure s
+ | NCicEnvironment.ObjectNotFound s
+ | NCicEnvironment.BadConstraint s as e->
+ prerr_endline ("######### " ^ Lazy.force s);
+ if not ignore_exc then raise e
+ | NCicEnvironment.BadDependency (s,x) as e ->
+ prerr_endline ("######### " ^ Lazy.force s);
+ aux x;
+ if not ignore_exc then raise e
+ | e -> raise e
+ in
+ aux exn