This commit is contained in:
Bryan Stitt 2022-09-22 22:15:56 +00:00
parent 6d23071640
commit 987ed181cd

View File

@ -35,9 +35,13 @@ pub struct OpenRequestHandle {
} }
pub enum RequestErrorHandler { pub enum RequestErrorHandler {
/// Contains the percent chance to save the revert
SaveReverts(f32), SaveReverts(f32),
/// Log at the debug level. Use when errors are expected.
DebugLevel, DebugLevel,
/// Log at the error level. Use when errors are bad.
ErrorLevel, ErrorLevel,
/// Log at the warn level. Use when errors do not cause problems.
WarnLevel, WarnLevel,
} }
@ -47,7 +51,7 @@ impl From<Level> for RequestErrorHandler {
Level::DEBUG => RequestErrorHandler::DebugLevel, Level::DEBUG => RequestErrorHandler::DebugLevel,
Level::ERROR => RequestErrorHandler::ErrorLevel, Level::ERROR => RequestErrorHandler::ErrorLevel,
Level::WARN => RequestErrorHandler::WarnLevel, Level::WARN => RequestErrorHandler::WarnLevel,
_ => unimplemented!(), _ => unimplemented!("unexpected tracing Level"),
} }
} }
} }