chiark
/
gitweb
/
~ryounger
/
brot2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
17b0e8c
)
CLI: Handle plot fails-to-start situations more gracefully.
master
author
Ross Younger
<onyx-commits@impropriety.org.uk>
Mon, 4 Feb 2013 07:56:16 +0000 (20:56 +1300)
committer
Ross Younger
<onyx-commits@impropriety.org.uk>
Mon, 4 Feb 2013 07:56:16 +0000 (20:56 +1300)
cli/climain.cpp
patch
|
blob
|
history
diff --git
a/cli/climain.cpp
b/cli/climain.cpp
index
c11fd94
..
6dec66d
100644
(file)
--- a/
cli/climain.cpp
+++ b/
cli/climain.cpp
@@
-275,7
+275,13
@@
int main (int argc, char**argv)
sink.set_plot(&plot);
plot.set_prefs(prefs);
- plot.start();
+ try {
+ plot.start();
+ } catch (BrotException e) {
+ // Usually means the pixels are too small for all known types.
+ std::cerr << "Plot failed to start: " << e.msg << std::endl;
+ return 4;
+ }
plot.wait();
if (!quiet)
std::cerr << std::endl << "Complete!" << std::endl;