SET STEP ON *-- Create the Object. LOCAL ox ox = CREATEOBJECT("DoThis") TRY *-- Run your process ox.RunThis() FINALLY *-- Release the Object. RELEASE ox ENDTRY *================ DEFINE CLASS doThis AS CUSTOM PROCEDURE MyError LPARAMETERS oErr AS EXCEPTION *-- Write message to file. LOCAL cMsg cMsg = "My method failed - Line "+TRANSFORM(oErr.LINENO )+" of "+TRANSFORM(oErr.PROCEDURE) STRTOFILE(cMsg, "Error.log", .T.) RETURN ENDPROC PROCEDURE RunThis *-- do somthing and fail. LOCAL i AS INTEGER && declare outside the TRY block so it is visible outside the TRY block. *-- start of method LOCAL oErr AS EXCEPTION TRY FOR i=1 TO 10 ?? "." NEXT *-- something happens, and the method fails, *-- so call ERROR with your cError message a=b && this will throw an error *-- Because the ERROR raised the error, and the CATCH caught it. *-- This part of the method is not ran. FOR i=1 TO 10 ?? "." NEXT CATCH TO oErr *-- catch the errors THIS.MyError( oErr ) FINALLY *-- do what ever clean up that is necessary to leave method properly. RELEASE i, oErr ENDTRY ENDPROC ENDDEFINEThe true TRY CATCH is inside the calling method, along with the error trap method. If the error trap method is defined in the parent or base class, the better.