#[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.
§Note
If an order parameter is not specified, the hook will have a higher priority than hooks with a specified order.
§Usage
use hyperlane::*;
use hyperlane_macros::*;
#[panic_hook]
#[panic_hook(1)]
#[panic_hook("2")]
async fn handle_panic(ctx: Context) {
// Panic handling logic
}
§Dependencies
This macro depends on the #[hyperlane(server: Server)]
macro to define the server instance.