Budman: hmm, well I use Try Except all the time in Delphi as that catches anything, not just stuff that is Raised (Thrown). However BMax only seems to catch runtime errors that are created with runtimeerror, not just ones that occur due to bugged code for example:
I've made F1 create a null image then try to draw it. I was hoping that program flow would jump to the catch and return the error but it won't so Try Catch is not a good general protection, it's only good for errors raised by the programmer. But thanks anyway. Any other ideas how I can make a "general" error trap?
Type TApplication Method Run() Graphics 640,480,0 While Not KeyHit(KEY_ESCAPE) Cls If KeyHit (KEY_F1) Local image=Null DrawImage image,0,0 End If Flip Wend End Method End Type ' Main code notice the try catch that whats important Try (New TApplication).Run Catch Text:TRuntimeException Notify Text.ToString() End Try
I've made F1 create a null image then try to draw it. I was hoping that program flow would jump to the catch and return the error but it won't so Try Catch is not a good general protection, it's only good for errors raised by the programmer. But thanks anyway. Any other ideas how I can make a "general" error trap?