Aha, it's OK I searched the modules and found TBlitzException which al the other are derived from and so made this code:
This works well. In debug mode I get a proper error message but in non-debug mode it just says "unhandled memory exception" which is a bit of a shame, but better than just bombing.
This is good because I'm having an issue with OpenGL just bombing on another PC and so now I can wrap all the code with this general catch all, compile a debug version, and then see what's going on (I hope).
[edit]OK, tried this line after the notify line:
In debug mode, the second notify is shown, but not in non-debug mode. I assume that debug mode must basically be able to show more detailed error messages due to the way the .exe is compiled - oh well.
Try (New TApplication).Run Catch o:Object If TBlitzException(o) Then Notify TBlitzException(o).ToString() End Try
This works well. In debug mode I get a proper error message but in non-debug mode it just says "unhandled memory exception" which is a bit of a shame, but better than just bombing.
This is good because I'm having an issue with OpenGL just bombing on another PC and so now I can wrap all the code with this general catch all, compile a debug version, and then see what's going on (I hope).
[edit]OK, tried this line after the notify line:
If TNullObjectException(o) Then Notify("Null Object")
In debug mode, the second notify is shown, but not in non-debug mode. I assume that debug mode must basically be able to show more detailed error messages due to the way the .exe is compiled - oh well.