Asn1ErrorHandler Class Reference
[Asn1NamedEventHandler]
#include <asn1CppEvtHndlr.h>
Detailed Description
Error handler base class. This is the base class from which user-defined error classes are derived. These classes can be used to provide fault-tolerance when parsing a message. The normal decoder behavior is to stop decoding when it encounters an error. An error handler can be used to ignore or take corrective action that will allow the decoding process to continue.
Public Member Functions | |
| virtual int | error (OSCTXT *pCtxt, ASN1CCB *pCCB, int stat)=0 |
Static Public Member Functions | |
| static int | invoke (OSCTXT *pCtxt, ASN1CCB *pCCB, int stat) |
| static int | invoke (OSCTXT *pCtxt, OSOCTET *ptr, int len, int stat) |
| static void | setErrorHandler (OSCTXT *pCtxt, Asn1ErrorHandler *pHandler) |
Member Function Documentation
| virtual int Asn1ErrorHandler::error | ( | OSCTXT * | pCtxt, | |
| ASN1CCB * | pCCB, | |||
| int | stat | |||
| ) | [pure virtual] |
The error handler callback method. This is the method that the user must override to provide customized error handling.
- Parameters:
-
pCtxt - Pointer to a context block structure. pCCB - Pointer to a context control block structure. stat - The error status that caused the handler to be invoked.
- Returns:
- - Corrected status. Set to 0 to cause decoding to continue or to a negative status code (most likely
stat) to cause decoding to terminate.
| static void Asn1ErrorHandler::setErrorHandler | ( | OSCTXT * | pCtxt, | |
| Asn1ErrorHandler * | pHandler | |||
| ) | [static] |
This static method is called to set the error handler within the context structure. Note that unlike event handlers, only a single error handling object can be specified. This must be called by the user to specify the error handling object prior to execution of the main decode function..
- Parameters:
-
pCtxt - Pointer to a context block structure. pHandler - Pointer to error handler object to register.
The documentation for this class was generated from the following file:
