瀏覽代碼

[compiler] don't catch Completion exceptions early

closes #10414
Simon Krajewski 3 年之前
父節點
當前提交
a17cd2feb6
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/compiler/compiler.ml

+ 2 - 3
src/compiler/compiler.ml

@@ -359,11 +359,10 @@ with
 	| Parser.SyntaxCompletion(kind,subj) ->
 		DisplayOutput.handle_syntax_completion com kind subj;
 		error ctx ("Error: No completion point was found") null_pos
-	| EvalExceptions.Sys_exit _ | Hlinterp.Sys_exit _ as exc ->
-		raise exc
 	| DisplayException.DisplayException dex ->
 		DisplayOutput.handle_display_exception ctx dex
-	| Out_of_memory as exc ->
+	| Out_of_memory | EvalExceptions.Sys_exit _ | Hlinterp.Sys_exit _ | DisplayProcessingGlobals.Completion _ as exc ->
+		(* We don't want these to be caught by the catchall below *)
 		raise exc
 	| e when (try Sys.getenv "OCAMLRUNPARAM" <> "b" with _ -> true) && not Helper.is_debug_run ->
 		error ctx (Printexc.to_string e) null_pos