diff options
author | James Campos <james.r.campos@gmail.com> | 2020-07-13 22:02:08 -0700 |
---|---|---|
committer | James Campos <james.r.campos@gmail.com> | 2020-07-13 22:02:08 -0700 |
commit | 46edc57b24558ee62c095482c49f0504860bac97 (patch) | |
tree | 3ed86944058734da7651b3d0a3db89d5d7671098 /src/main.rs | |
parent | ce2e48d7a39fecf0e5c3ea0e16a4fa2de535518b (diff) | |
download | bk-46edc57b24558ee62c095482c49f0504860bac97.tar.gz |
use anyhow in epub
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
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 |