Print errors to stderr, exit 1

This commit is contained in:
Tom Jack 2019-09-04 09:41:14 -07:00
parent f3c80908ee
commit c07f0633cd

View File

@ -9,4 +9,8 @@ let toplevel ~(display_format : string) (x : string result) =
failwith "Display format" failwith "Display format"
) )
in in
Format.printf "%a" (formatted_string_result_pp display_format) x match x with
| Ok _ -> Format.printf "%a" (formatted_string_result_pp display_format) x
| Error _ ->
Format.eprintf "%a" (formatted_string_result_pp display_format) x ;
exit 1