summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index b84ee78d9..6c75fb515 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -59,16 +59,20 @@ fn main() {
// Therefore this hack.
std::panic::set_hook(Box::new(|panic_info| {
if let Some(location) = panic_info.location() {
- println!("PANIC file '{}' line {}", location.file(), location.line());
+ eprintln!("PANIC file '{}' line {}", location.file(), location.line());
} else {
- println!("PANIC occurred but can't get location information...");
+ eprintln!("PANIC occurred but can't get location information...");
}
std::process::abort();
}));
log::set_logger(&LOGGER).unwrap();
let args = env::args().collect();
- let mut isolate = isolate::Isolate::new(args, ops::dispatch);
+ let (flags, rest_argv) = flags::set_flags(args).unwrap_or_else(|err| {
+ eprintln!("{}", err);
+ std::process::exit(1)
+ });
+ let mut isolate = isolate::Isolate::new(flags, rest_argv, ops::dispatch);
flags::process(&isolate.state.flags);
tokio_util::init(|| {
isolate