Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

Error Handlers

Do error handlers need to be in the routine that the Motion Pointer is in when the error occurs? Or the routine that the Program Pointer is in?
I assume if you have an error handler in the main routine, and you call a second routine, the error handler will not work if the error occurs before the PP or MP returns from the second routine?

Answers

  • I expect that the only relevance that the motion pointer has would be if you use collision error handling.  More often than not the program pointer will be ahead of the mp.  If there is a possibility that an error will occur in a called routine, then it should have its own error handler.  You could even use the RAISE instruction to bring the error to the calling routine for its error handler to deal with.
    Lee Justice