chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0331515
)
otter: Do not panic on (most) command execution errors
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 19:33:23 +0000
(20:33 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 19:40:49 +0000
(20:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/otter.rs
patch
|
blob
|
history
diff --git
a/src/bin/otter.rs
b/src/bin/otter.rs
index dc531d0f760ec629411dd854b0739a126fdc57c9..75016025c6cd86cfa43d4403c2eb413e32719fb7 100644
(file)
--- a/
src/bin/otter.rs
+++ b/
src/bin/otter.rs
@@
-435,7
+435,14
@@
fn main() {
env::args().next().unwrap(),
&subcommand));
- call(sc, mo, subargs).expect("execution error");
+ call(sc, mo, subargs).unwrap_or_else(|e|{
+ eprint!("otter: error");
+ for e in e.chain() {
+ eprint!(": {}", &e);
+ }
+ eprintln!("");
+ exit(12);
+ })
}
struct Conn {