diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-07-24 21:32:21 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-07-24 21:32:21 +0200 |
commit | 5f10ab976fcc75683985d2551ff16f7858cac49a (patch) | |
tree | 90c60a680252c985b2cf3e571ab0bdb32dcece3f /bin | |
parent | 03fec5f4dbdd3fd46ae949957f3b89ec92a188ab (diff) |
Rewrite get_rtp_match() to not panic
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/core/imag/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/core/imag/src/main.rs b/bin/core/imag/src/main.rs index 590c1bbc..9c9d817d 100644 --- a/bin/core/imag/src/main.rs +++ b/bin/core/imag/src/main.rs @@ -195,7 +195,11 @@ fn main() { let enable_logging = app.enable_logging(); let matches = app.matches(); - let rtp = ::libimagrt::runtime::get_rtp_match(&matches); + let rtp = ::libimagrt::runtime::get_rtp_match(&matches) + .unwrap_or_else(|e| { + trace_error(&e); + exit(1) + }); let configpath = matches .value_of(Runtime::arg_config_name()) .map_or_else(|| rtp.clone(), PathBuf::from); |