#include <xmltooling/exceptions.h>
Inheritance diagram for xmltooling::XMLToolingException:
Public Types | |
typedef XMLToolingException * | ExceptionFactory () |
A factory function that returns an empty exception object of a given type. | |
Public Member Functions | |
XMLToolingException (const char *msg=0, const params &p=params()) | |
Constructs an exception using a message and positional parameters. | |
XMLToolingException (const char *msg, const namedparams &p) | |
Constructs an exception using a message and named parameters. | |
XMLToolingException (const std::string &msg, const params &p=params()) | |
Constructs an exception using a message and positional parameters. | |
XMLToolingException (const std::string &msg, const namedparams &p) | |
Constructs an exception using a message and named parameters. | |
const char * | getMessage () const |
Returns the error message, after processing any parameter references. | |
const char * | what () const throw () |
Returns the error message, after processing any parameter references. | |
void | setMessage (const char *msg) |
Sets the error message. | |
void | setMessage (const std::string &msg) |
Sets the error message. | |
void | addProperties (const params &p) |
Attach a set of positional parameters to the exception. | |
void | addProperties (const namedparams &p) |
Attach a set of named parameters to the exception. | |
void | addProperty (const char *value) |
Attach a single positional parameter at the next available position. | |
void | addProperty (const char *name, const char *value) |
Attach a single named parameter. | |
const char * | getProperty (unsigned int index) const |
Returns the parameter property with the designated position (based from one). | |
const char * | getProperty (const char *name) const |
Returns the parameter property with the designated name. | |
virtual void | raise () const |
Raises an exception using itself. | |
virtual const char * | getClassName () const |
Returns a unique name for the exception class. | |
std::string | toString () const |
Returns a string containing a serialized representation of the exception. | |
std::string | toQueryString () const |
Returns a set of query string name/value pairs, URL-encoded, representing the exception's type, message, and parameters. | |
Static Public Member Functions | |
static XMLToolingException * | getInstance (const char *exceptionClass) |
Builds an empty exception of the given type. | |
static XMLToolingException * | fromStream (std::istream &in) |
Builds an exception from a serialized input stream. | |
static XMLToolingException * | fromString (const char *s) |
Builds an exception from a serialized input buffer. | |
static void | registerFactory (const char *exceptionClass, ExceptionFactory *factory) |
Registers a factory to create exceptions of a given class name. | |
static void | deregisterFactory (const char *exceptionClass) |
Unregisters the factory for a given class name. | |
static void | deregisterFactories () |
Unregisters all factories. |
Parameters are prefixed with a dollar sign ($) and can be positional ($1) or named ($info).
|
Constructs an exception using a message and positional parameters.
|
|
Constructs an exception using a message and named parameters.
|
|
Constructs an exception using a message and positional parameters.
|
|
Constructs an exception using a message and named parameters.
|
|
Attach a set of named parameters to the exception.
|
|
Attach a set of positional parameters to the exception.
|
|
Attach a single named parameter.
|
|
Attach a single positional parameter at the next available position.
|
|
Unregisters the factory for a given class name.
|
|
Builds an exception from a serialized input stream.
|
|
Builds an exception from a serialized input buffer.
|
|
Returns a unique name for the exception class.
Reimplemented in xmlencryption::DecryptionException, xmlencryption::EncryptionException, xmltooling::XMLParserException, xmltooling::XMLObjectException, xmltooling::MarshallingException, xmltooling::UnmarshallingException, xmltooling::UnknownElementException, xmltooling::UnknownAttributeException, xmltooling::UnknownExtensionException, xmltooling::ValidationException, xmltooling::IOException, xmltooling::XMLSecurityException, xmlsignature::SignatureException, and xmltooling::ThreadingException. |
|
Builds an empty exception of the given type.
|
|
Returns the error message, after processing any parameter references.
|
|
Returns the parameter property with the designated name.
|
|
Returns the parameter property with the designated position (based from one).
|
|
Raises an exception using itself. Used to raise an exception of a derived type. Reimplemented in xmlencryption::DecryptionException, xmlencryption::EncryptionException, xmltooling::XMLParserException, xmltooling::XMLObjectException, xmltooling::MarshallingException, xmltooling::UnmarshallingException, xmltooling::UnknownElementException, xmltooling::UnknownAttributeException, xmltooling::UnknownExtensionException, xmltooling::ValidationException, xmltooling::IOException, xmltooling::XMLSecurityException, xmlsignature::SignatureException, and xmltooling::ThreadingException. |
|
Registers a factory to create exceptions of a given class name.
|
|
Sets the error message.
|
|
Sets the error message.
|
|
Returns a set of query string name/value pairs, URL-encoded, representing the exception's type, message, and parameters.
|
|
Returns a string containing a serialized representation of the exception.
|
|
Returns the error message, after processing any parameter references.
|