Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
grew
Commits
e927dd12
Commit
e927dd12
authored
Sep 10, 2018
by
Bruno Guillaume
Browse files
improve error message handling
parent
a359c71d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/grew_args.ml
View file @
e927dd12
...
...
@@ -117,7 +117,7 @@ module Grew_args = struct
|
"-debug_loop"
::
args
->
Rewrite
.
set_debug_loop
()
;
loop
args
|
"-dep_dir"
::
dir
::
args
->
dep_dir
:=
Some
dir
;
loop
args
|
x
->
Log
.
fwarning
"I
gnore
d argument
s
: %s
"
(
String
.
concat
" "
x
)
|
x
::
args
->
Log
.
fwarning
"I
nvali
d argument: %s
, it is ignored!"
x
;
loop
args
let
parse
()
=
match
Array
.
to_list
Sys
.
argv
with
...
...
src/grew_corpus.ml
View file @
e927dd12
...
...
@@ -19,9 +19,7 @@ open Grew_args
(* -------------------------------------------------------------------------------- *)
let
fail
msg
=
let
rule
=
String
.
make
(
String
.
length
msg
)
'
=
'
in
Log
.
fwarning
"
\n
%s
\n
%s
\n
%s"
rule
msg
rule
;
exit
2
let
fail
msg
=
Log
.
fmessage
"%s"
msg
;
exit
2
let
handle
fct
()
=
try
fct
()
...
...
src/grew_main.ml
View file @
e927dd12
...
...
@@ -31,8 +31,7 @@ let _ =
|
Grew_args
.
Gui
args
->
let
gui_exec
=
if
Sys
.
argv
.
(
0
)
=
"grew_dev"
then
"grew_gui_dev"
else
"grew_gui"
in
match
Unix
.
system
(
gui_exec
^
" "
^
args
)
with
|
Unix
.
WEXITED
i
when
i
<>
0
->
Log
.
warning
"It seems that grew_gui is not installed on your system. Try to run
\"
opam install grew_gui
\"
"
|
Unix
.
WEXITED
127
->
Log
.
message
"It seems that grew_gui is not installed on your system. See [http://grew.fr/gtk] for more information"
|
_
->
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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