@@ -75,7 +75,7 @@ let recoverable_error ?(code = 1) =
7575let fatal_error ?(code = 1 ) =
7676 Format. kasprintf (fun msg -> recoverable_error ~code " %s" msg; exit code)
7777
78- let exit_as_timeout () = fatal_error ~code: 142 " timeout"
78+ let exit_as_timeout ?( code = 142 ) () = fatal_error ~code " timeout"
7979
8080let warning (msg : ('a, Format.formatter, unit, unit, unit, 'b) format6 ) : 'a =
8181 if Options. get_warning_as_error () then
@@ -208,7 +208,7 @@ let main () =
208208 Frontend. print_status status i;
209209 match status with
210210 | Timeout _ when not (Options. get_timelimit_per_goal () ) ->
211- exit_as_timeout ()
211+ exit_as_timeout ~code: 111 ()
212212 | _ -> raise StopProcessDecl
213213 in
214214 let () =
@@ -256,7 +256,7 @@ let main () =
256256 with Util. Timeout ->
257257 (* It is still necessary to leave this catch here, because we may
258258 trigger this exception in between calls of the sat solver. *)
259- if not (Options. get_timelimit_per_goal() ) then exit_as_timeout () ;
259+ if not (Options. get_timelimit_per_goal() ) then exit_as_timeout ~code: 112 () ;
260260 Unknown None
261261 in
262262
@@ -337,7 +337,7 @@ let main () =
337337 with
338338 | Util. Timeout ->
339339 Frontend. print_status (Timeout None ) 0 ;
340- exit_as_timeout ()
340+ exit_as_timeout ~code: 113 ()
341341 | Parsing. Parse_error ->
342342 (* TODO(Steven): displaying a dummy value is a bad idea.
343343 This should only be executed with the legacy frontend, which should
@@ -390,7 +390,7 @@ let main () =
390390 Options.Time. unset_timeout () ;
391391 with Util. Timeout ->
392392 Frontend. print_status (Timeout None ) 0 ;
393- exit_as_timeout ()
393+ exit_as_timeout ~code: 114 ()
394394 in
395395
396396 let solver_ctx_key: solver_ctx State. key =
@@ -488,7 +488,7 @@ let main () =
488488 recoverable_error " %t" msg; st
489489 | Util. Timeout ->
490490 Printer. print_status_timeout None None None None ;
491- exit_as_timeout ()
491+ exit_as_timeout ~code: 115 ()
492492 | Errors. Error e ->
493493 recoverable_error " %a" Errors. report e;
494494 st
@@ -1466,7 +1466,7 @@ let main () =
14661466 Options.Time. start () ;
14671467 Options.Time. set_timeout (Options. get_timelimit () );
14681468 end
1469- else exit_as_timeout ()
1469+ else exit_as_timeout ~code: 116 ()
14701470 in
14711471 st
14721472 | {
@@ -1483,7 +1483,7 @@ let main () =
14831483 Options.Time. start () ;
14841484 Options.Time. set_timeout (Options. get_timelimit () );
14851485 end
1486- else exit_as_timeout ()
1486+ else exit_as_timeout ~code: 117 ()
14871487 in
14881488 st
14891489 | {contents; _ } ->
0 commit comments