| > Expat4D Home > Documentation > Command Reference |
xml_SetErrorHandler ( errorHandlerMethod ) --> lastErrorHandler
Like 4D's ON ERROR CALL function, only this sets up an error handler for the Expat4D commands. Currently, the error handler routine is only called for errors which are only to do with Expat4D itself. Errors from expat are reported through the return values of xml_Parse and xml_ParseBlob. This function returns the last errorHandler routine which was set using this function. This can be used to resetting the errorHandler to it's previous method after a particular operation. Your error handler routine should be defined to allow two longint parameters. The first parameter contains the plug-in command number which caused the error. The second parameter contains the Expat4D error code which you can use the Expat4D error constants to check against. The following code sample shows setting up the error handler.
`Method: xml_Parse (text)
The following code sample is a simple error handling routine.
Method: expat4D_ErrorHandler (cmdNo; errorCode)
|
Developer Documentation
Creating Parsers, Destroying Parsers, Parsing TextConfiguring Handler Methods
Position and Error Reporting Functions
Miscellaneous Functions
Output Buffer Functions
Error Codes |
| > Expat4D Home > Documentation > Command Reference |
Last Modified: 27th April 2001 at 9:00 PM