OnErrorExit()

Syntax

OnErrorExit()
Description
Changes the action taken if an error occurs to directly exit the program, even if the default action on the system is not to exit the program on this kind of error. The system may display an error dialog or print an error-message on the console on exit.

Parameters

None.

Return value

None.

Remarks

To exit the program silently and suppress any system message, use OnErrorCall() and end the program from the error handler.

Example

  MessageRequester("OnError test", "Test start")

  OnErrorExit()
  Pokes(10, "Hello World") ; Cause a #PB_OnError_InvalidMemory error
  
  MessageRequester("OnError test", "This should never be displayed")

Supported OS

All

<- OnErrorDefault() - OnError Index - OnErrorGoto() ->