TRY lc_message = "a message to say everthing's good" IF .t. && fake an error *-- This is the bit I need help with - how do I get the error handler *-- below (i.e. the CATCH) to get this message as an error - since its *-- not a genuine error - I just want to use CATCH to handle all problems *-- Is this correct lc_message = "Huston, we have a problem" THROW lc_message ENDIF CATCH to lo_Exception lc_errormsg = 'Error: '+TRANSFORM(lo_Exception.Errorno) + ; ' - ' + lo_Exception.Message +; CHR(13) + CHR(10) + ; 'Line #: ' + TRANSFORM(lo_Exception.lineno) + ; ' - ' + lo_Exception.linecontents + ; CHR(13) + CHR(10) + ; 'Function: '+ TRIM(lo_Exception.procedure) lc_messge = lc_errormsg FINALLY ENDTRY lc_XML = '<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>' + ; CHR(13) + CHR(10) + ; '<text>' + ; CHR(13) + CHR(10) + ; lc_messge + ; CHR(13) + CHR(10) + ; '</text>' RETURN lc_XML