We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a97f813 commit 7422ca4Copy full SHA for 7422ca4
src/grader/grader_cli.ml
@@ -60,6 +60,19 @@ let grade ?(print_result=false) ?dirname
60
>>= fun (result, stdout_contents, stderr_contents, outcomes) ->
61
flush stderr;
62
match result with
63
+ | Error (Grading.Internal_error _ as err) ->
64
+ let dump_error ppf =
65
+ Format.fprintf ppf "%s@." (Grading.string_of_err err)
66
+ in
67
+ begin match dump_outputs with
68
+ | None -> ()
69
+ | Some prefix ->
70
+ let oc = open_out (prefix ^ ".error") in
71
+ dump_error (Format.formatter_of_out_channel oc) ;
72
+ close_out oc
73
+ end ;
74
+ dump_error Format.err_formatter ;
75
+ Lwt.return (Error (-1))
76
| Error err ->
77
let dump_error ppf =
78
Format.fprintf ppf "%s@." (Grading.string_of_err err);
0 commit comments