Skip to content

Commit 217935a

Browse files
committed
[asllib][www] Print return code for interpretation
1 parent b81fc28 commit 217935a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

asllib/asllib-www/jaslref.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ let run_asl code version exec =
6767
Js_of_ocaml.Sys_js.update_file ~name:"web-input.asl" ~content:_code
6868
in
6969

70-
try
71-
run_with argv;
72-
if not _exec then Printf.printf "ASL: type-check completed.\n%!"
73-
with
70+
try run_with argv with
7471
| Asllib.Error.ASLException e ->
7572
Printf.eprintf "%s\n%!" (Asllib.Error.error_to_string e)
76-
| Exit _ -> ()
73+
| Exit code ->
74+
if not _exec then Printf.printf "ASL: type-check completed.\n%!"
75+
else
76+
Printf.printf "ASL: interpretation completed (exit code %n).\n%!" code
7777

7878
(* Expose to JavaScript *)
7979
let () = Js.Unsafe.global##.runAsl := Js.wrap_callback run_asl

0 commit comments

Comments
 (0)