The manual for OnErrorGoto() has this example code (and I added DisableDebugger at the top):
Code: Select all
DisableDebugger
MessageRequester("OnError test", "Test start")
OnErrorGoto(?ErrorHandler)
PokeS(10, "Hello World") ; Cause a #PB_OnError_InvalidMemory error
MessageRequester("OnError test", "This should never be displayed")
End
ErrorHandler:
MessageRequester("OnError test", "The following error happened: " + ErrorMessage())
End
So... maybe this is a documentation issue, and the doc needs to explain that this command only works from a compiled exe? And if so, do the same explanation for the other OnError commands if it applies to them as well.