aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2020-07-13 22:02:08 -0700
committerJames Campos <james.r.campos@gmail.com>2020-07-13 22:02:08 -0700
commit46edc57b24558ee62c095482c49f0504860bac97 (patch)
tree3ed86944058734da7651b3d0a3db89d5d7671098 /src/main.rs
parentce2e48d7a39fecf0e5c3ea0e16a4fa2de535518b (diff)
downloadbk-46edc57b24558ee62c095482c49f0504860bac97.tar.gz
use anyhow in epub
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d2c965f..30abdec 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -758,7 +758,10 @@ fn main() {
exit(0);
}
let mut bk = Bk::new(epub, state.bk);
- bk.run().unwrap();
+ bk.run().unwrap_or_else(|e| {
+ println!("run error: {}", e);
+ exit(1);
+ });
let byte = bk.chap().lines[bk.line].0;
state