Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
grew
Commits
c447eb65
Commit
c447eb65
authored
Mar 25, 2020
by
Bruno Guillaume
Browse files
catch Sys_error
parent
6a146c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grew_corpus.ml
View file @
c447eb65
...
...
@@ -19,7 +19,11 @@ open Grew_args
(* -------------------------------------------------------------------------------- *)
let
fail
msg
=
Log
.
fmessage
"%s"
msg
;
exit
2
let
fail
msg
=
Log
.
fmessage
"-------------------------------------"
;
Log
.
fmessage
"%s"
msg
;
Log
.
fmessage
"-------------------------------------"
;
exit
2
let
handle
fct
()
=
try
fct
()
...
...
@@ -28,7 +32,7 @@ let handle fct () =
|
Libgrew
.
Error
msg
->
fail
msg
|
Corpus
.
File_not_found
file
->
fail
(
sprintf
"File not found:
\"
%s
\"
"
file
)
|
Corpus
.
Fail
msg
->
fail
msg
|
Sys_error
msg
->
fail
(
sprintf
"System error: %s"
msg
)
|
Libgrew
.
Bug
msg
->
fail
(
sprintf
"Libgrew.bug, please report: %s"
msg
)
|
exc
->
fail
(
sprintf
"Uncaught exception, please report: %s"
(
Printexc
.
to_string
exc
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment