Throws a panic error with the specified message. Panic errors are special errors that indicate unrecoverable situations.

A Panic error

if (criticalSystemFailure) {
PANIC('Critical system failure', error);
}
  • Parameters

    • message: string

      The panic message

    • Optionalcause: unknown

      Optional cause of the panic

    Returns never