panic_hook

Attribute Macro panic_hook 

Source
#[panic_hook]
Expand description

Registers a function as a panic hook.

This attribute macro registers the decorated function to handle panics that occur during request processing. This macro requires the #[hyperlane(server: Server)] macro to be used to define the server instance.

§Usage

use hyperlane::*;
use hyperlane_macros::*;

#[panic_hook]
async fn handle_panic(ctx: Context) {
    // Panic handling logic
}

§Dependencies

This macro depends on the #[hyperlane(server: Server)] macro to define the server instance.