catch all bugs/errors

so i was wondering if anyone knows of a good way to catch all errors and maybe log them or something.
As i try hard to get rid of all bugs but if an unexpected one comes up the default msgbox is not to good that says something like uncaught exception error.
almost like when word crashes, a crash report comes up.
So in short, anyone have some good way to catch all bugs/erros and then log them.

Hi Paul,

Have you checked the User Manual? Section 8.3 in Book 3:

If you have specific question don’t hesitate to ask.


i know of the error catching in xojo in it’s basic form i guess.
what i want to know is. if anyone has a class available that is good for this.
or a way to catch errors i miss with the try function.

Check this thread and the links in it:

Also, you can use extensive logging (system.debuglog) in your code to see where it stops.


You can ultimately catch unhandled exceptions in the App.UnhandledException event, but this should be a last resort. If an exception gets here, your users should have some mechanism to report it to you, and then quit your app gracefully. See:

A long time ago I wrote a library that catches errors and lets a user optionally enter a comment as to what they were doing and their email address and submit it to FogBugz.

If you’re working with a desktop app, and fancy using FogBugz for tracking bugs it might be worth a look. Although I haven’t updated it in many years, it should still work. There’s code for an example app included that shows how to catch UnhandledException etc.