Daniel Karzel
3 years ago
2 changed files with 14 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||
|
/// Wrapper for errors in loop that logs error and continues
|
||||
|
#[macro_export] |
||||
|
macro_rules! try_continue { |
||||
|
($result:expr) => { |
||||
|
match $result { |
||||
|
Ok(value) => value, |
||||
|
Err(e) => { |
||||
|
tracing::error!("{:#}", e); |
||||
|
continue; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
} |
Loading…
Reference in new issue