aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-29 20:00:38 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-29 20:00:38 +0200
commitb71d9678892814a62d422af11eb91e61943836a2 (patch)
treebbfcb8964fa87361595dfb89d9c174bf24458b0a /src/main.rs
parentde71f4b4edcd66e68a79ce15800a7eab0f6ad72c (diff)
downloadaerogramme-b71d9678892814a62d422af11eb91e61943836a2.tar.gz
aerogramme-b71d9678892814a62d422af11eb91e61943836a2.zip
Fetch ENVELOPE works \o/
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 5d139b6..6744157 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -118,6 +118,12 @@ async fn main() -> Result<()> {
std::env::set_var("RUST_LOG", "main=info,mailrage=info,k2v_client=info")
}
+ // Abort on panic (same behavior as in Go)
+ std::panic::set_hook(Box::new(|panic_info| {
+ tracing::error!("{}", panic_info.to_string());
+ std::process::abort();
+ }));
+
tracing_subscriber::fmt::init();
let args = Args::parse();