shorten exit on error

This commit is contained in:
Kai Sickeler 2016-07-30 19:12:29 +02:00
parent 6a8c93ee52
commit 6e56653c8e

View file

@ -28,7 +28,7 @@ use std::process::exit;
use std::path::PathBuf; use std::path::PathBuf;
use libimagrt::setup::generate_runtime_setup; use libimagrt::setup::generate_runtime_setup;
use libimagerror::trace::trace_error; use libimagerror::trace::trace_error_exit;
use libimagentryview::builtin::stdout::StdoutViewer; use libimagentryview::builtin::stdout::StdoutViewer;
use libimagentryview::builtin::versions::VersionsViewer; use libimagentryview::builtin::versions::VersionsViewer;
use libimagentryview::viewer::Viewer; use libimagentryview::viewer::Viewer;
@ -62,8 +62,7 @@ fn main() {
exit(1); exit(1);
} }
Err(e) => { Err(e) => {
trace_error(&e); trace_error_exit(&e, 1);
exit(1); // we can afford not-executing destructors here
} }
}; };
@ -85,8 +84,7 @@ fn main() {
}; };
if let Err(e) = res { if let Err(e) = res {
trace_error(&e); trace_error_exit(&e, 1);
exit(1);
} }
} }