JavaScript Editor js editor     Web development 

Main Page

When an error occurs in the TRY block within a TRY...CATCH...FINALLY error handling structure, Visual FoxPro creates an Exception object automatically and uses the VarName memory variable specified in the CATCH TO clause to store a reference to the exception. The THROW command also generates an Exception object. However, if no TRY...CATCH...FINALLY structure traps the thrown exception, Visual FoxPro escalates the exception another error handler or Visual FoxPro's global error handler.

You can define and subclass the Exception class.



Visual FoxPro supports the Exception class only in program (.prg) files.

Exception objects do not support all the various error information, including Component Object Model (COM), Open Database Connectivity (ODBC), and database triggers, that you can usually obtain from the AERROR(В ) function. However, you can access AERROR(В ) information inside the TRY...CATCH block.


В Copy Code
oError = CREATEOBJECT("exception")

See Also

JavaScript Editor js editor     Web development