Print errors to stderr, exit 1
This commit is contained in:
parent
f3c80908ee
commit
c07f0633cd
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user