panic_soundcloud/
lib.rs

1//! wow this blew up
2//!
3//! Handles panics by linking the original poster's SoundCloud.
4//! Backtrace is not displayed, because it would divert attention from the link.
5//!
6//! This crate is not affiliated or endorsed by SoundCloud.
7//! It's just a meme, you know.
8//!
9//! The SoundCloud is assumed to be the using crate's homepage from `Cargo.toml`.
10
11/// Initialises the panic handler
12///
13/// The SoundCloud is assumed to be the using crate's homepage from `Cargo.toml`.
14///
15/// ```
16/// panic_soundcloud::setup!();
17/// ```
18#[macro_export]
19macro_rules! setup {
20    () => {
21        std::panic::set_hook(Box::new(move |info: &std::panic::PanicInfo| {
22            println!(
23                "wow this blew up here's my soundcloud: {}",
24                env!("CARGO_PKG_HOMEPAGE")
25            );
26        }));
27    };
28}