diff --git a/src/main.ml b/src/main.ml
index 8dbb9e47281face73e4237a5d9c0b13fcb9e3c5e..993fac062a68b99df72eea009dfcd847bf3bf907 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -450,6 +450,7 @@ let () =
     match exn with
     | Invalid_argument msg -> Fmt.pf fmt "Invalid argument: %s" msg
     | Failure msg -> Fmt.pf fmt "Failure: %s" msg
+    | Sys_error msg -> Fmt.pf fmt "%s" msg
     | _ -> raise exn)
 
 let () =