瀏覽代碼

do not choke on errors when force-loading macros in display mode

Simon Krajewski 9 年之前
父節點
當前提交
c020a8a902
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/typing/typeload.ml

+ 1 - 1
src/typing/typeload.ml

@@ -2154,7 +2154,7 @@ module ClassInitializer = struct
 		let handle_display_field () =
 			if fctx.is_macro && not ctx.in_macro then
 				(* force macro system loading of this class in order to get completion *)
-				delay ctx PTypeField (fun() -> try ignore(ctx.g.do_macro ctx MDisplay c.cl_path cf.cf_name [] p) with Exit -> ())
+				delay ctx PTypeField (fun() -> try ignore(ctx.g.do_macro ctx MDisplay c.cl_path cf.cf_name [] p) with Exit | Error _ -> ())
 			else begin
 				cf.cf_type <- TLazy r;
 				cctx.delayed_expr <- (ctx,Some r) :: cctx.delayed_expr;