Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
a9fa7d33
Commit
a9fa7d33
authored
Nov 25, 2014
by
Alexandre Duret-Lutz
Browse files
autfilt: diagnose non-existant files
* src/bin/autfilt.cc: Catch exception. * src/tgbatest/hoaparse.test: Test it.
parent
e7e21ae5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/autfilt.cc
View file @
a9fa7d33
...
...
@@ -391,7 +391,14 @@ main(int argc, char** argv)
post
.
set_level
(
level
);
hoa_processor
processor
(
post
);
if
(
processor
.
run
())
return
2
;
try
{
if
(
processor
.
run
())
return
2
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
error
(
2
,
0
,
"%s"
,
e
.
what
());
}
return
0
;
}
src/tgbatest/hoaparse.test
View file @
a9fa7d33
...
...
@@ -717,3 +717,7 @@ input:4.7-242: unclosed string
input:4.7-242: syntax error, unexpected end of file, expecting string
autfilt: failed to read automaton from input
EOF
expecterr non-existant<<EOF
autfilt: Cannot open file non-existant
EOF
Write
Preview
Supports
Markdown
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