# takePanicHook

`import { takePanicHook } from "destack:error";`

Remove the runtime panic hook and return the previous hook.

```ds title="takePanicHook"
export declare function takePanicHook(): (Panic) => void
```

[language/library/src/error/panic.ds:40](https://github.com/destack-sh/destack/blob/main/language/library/src/error/panic.ds#L40)
