Browse Source

more sanity

Simon Krajewski 1 năm trước cách đây
mục cha
commit
026c223d56
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/compiler/hxb/hxbReader.ml

+ 5 - 1
src/compiler/hxb/hxbReader.ml

@@ -1502,7 +1502,11 @@ class hxb_reader
 		let instance_overload_cache = Hashtbl.create 0 in
 		let a = Array.init l (fun i ->
 			let c = self#read_class_ref in
-			ignore(c.cl_build());
+			begin try
+				ignore(c.cl_build())
+			with Error.Error err ->
+				error (Printf.sprintf "[HXB] [%s] Error while building class %s: %s" (s_type_path current_module.m_path) (s_type_path c.cl_path) (Error.error_msg err.err_message))
+			end;
 			let kind = match IO.read_byte ch with
 				| 0 -> CfrStatic
 				| 1 -> CfrMember