mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
mononoke/cmdlib: allow not setting a panic handler
Summary: Sometimes we may not want it. Reviewed By: StanislavGlebik Differential Revision: D9840364 fbshipit-source-id: b71a4f1275733aead94b17d21a9bbf4ddc3a8ff2
This commit is contained in:
parent
4ea641671f
commit
7bd0401d65
@ -171,12 +171,15 @@ pub fn get_logger<'a>(matches: &ArgMatches<'a>) -> Logger {
|
||||
.value_of("panic-fate")
|
||||
.expect("no default on panic-fate")
|
||||
{
|
||||
"continue" => Fate::Continue,
|
||||
"exit" => Fate::Exit(101),
|
||||
"abort" => Fate::Abort,
|
||||
"none" => None,
|
||||
"continue" => Some(Fate::Continue),
|
||||
"exit" => Some(Fate::Exit(101)),
|
||||
"abort" => Some(Fate::Abort),
|
||||
bad => panic!("bad panic-fate {}", bad),
|
||||
};
|
||||
panichandler::set_panichandler(fate);
|
||||
if let Some(fate) = fate {
|
||||
panichandler::set_panichandler(fate);
|
||||
}
|
||||
|
||||
let severity = if matches.is_present("debug") {
|
||||
Severity::Debug
|
||||
|
Loading…
Reference in New Issue
Block a user