#include <ACEXML/common/SAXExceptions.h>
Public Member Functions | |
ACEXML_SAXException (void) | |
Default constructor. | |
ACEXML_SAXException (const ACEXML_Char *msg) | |
Constructor initializing the exception message. | |
ACEXML_SAXException & | operator= (const ACEXML_SAXException &src) |
Assignment operator. | |
ACEXML_SAXException (const ACEXML_SAXException &ex) | |
Copy constructor. | |
virtual | ~ACEXML_SAXException (void) |
Destructor. | |
virtual void | _raise (void) |
Throw the exception. | |
virtual const ACEXML_Char * | id (void) const |
Return the name of the exception. | |
const ACEXML_Char * | message (void) const |
Return the extra message accompanying the exception. | |
virtual ACEXML_Exception * | duplicate (void) const |
Dynamically create a copy of this exception. | |
virtual int | is_a (const ACEXML_Char *name) |
Check whether this is an exception of type specified by <name>. | |
virtual void | print (void) const |
Print out exception using ACE_DEBUG. | |
Static Public Member Functions | |
static ACEXML_SAXException * | _downcast (ACEXML_Exception *ex) |
Static narrow operation. | |
Protected Attributes | |
ACEXML_Char * | message_ |
A message providing more information about the exception being thrown. | |
Static Protected Attributes | |
static const ACEXML_Char * | exception_name_ = ACE_TEXT ("ACEXML_SAXException") |
ACEXML_SAXException is the mother of all SAX related exceptions.
Definition at line 32 of file SAXExceptions.h.
ACEXML_SAXException::ACEXML_SAXException | ( | void | ) |
ACEXML_SAXException::ACEXML_SAXException | ( | const ACEXML_Char * | msg | ) |
Constructor initializing the exception message.
Definition at line 26 of file SAXExceptions.cpp.
: message_ (ACE::strnew (msg)) { }
ACEXML_SAXException::ACEXML_SAXException | ( | const ACEXML_SAXException & | ex | ) |
Copy constructor.
Definition at line 31 of file SAXExceptions.cpp.
: ACEXML_Exception (ex), message_ (ACE::strnew (ex.message_)) { }
ACEXML_SAXException::~ACEXML_SAXException | ( | void | ) | [virtual] |
ACEXML_SAXException * ACEXML_SAXException::_downcast | ( | ACEXML_Exception * | ex | ) | [static] |
Static narrow operation.
Reimplemented from ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 51 of file SAXExceptions.cpp.
{ return dynamic_cast<ACEXML_SAXException*> (ex); }
ACEXML_INLINE void ACEXML_SAXException::_raise | ( | void | ) | [virtual] |
Throw the exception.
Implements ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 12 of file SAXExceptions.inl.
{ ACEXML_RAISE (*this); }
ACEXML_Exception * ACEXML_SAXException::duplicate | ( | void | ) | const [virtual] |
Dynamically create a copy of this exception.
Implements ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 62 of file SAXExceptions.cpp.
{ ACEXML_Exception *tmp; ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0); return tmp; }
ACEXML_INLINE const ACEXML_Char * ACEXML_SAXException::id | ( | void | ) | const [virtual] |
Return the name of the exception.
Reimplemented from ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 36 of file SAXExceptions.inl.
{ return ACEXML_SAXException::exception_name_; }
int ACEXML_SAXException::is_a | ( | const ACEXML_Char * | name | ) | [virtual] |
Check whether this is an exception of type specified by <name>.
Reimplemented from ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 70 of file SAXExceptions.cpp.
{ return ACE_OS::strcmp (ACEXML_SAXException::exception_name_, name) == 0 || this->ACEXML_Exception::is_a (name); }
ACEXML_INLINE const ACEXML_Char * ACEXML_SAXException::message | ( | void | ) | const |
Return the extra message accompanying the exception.
Definition at line 4 of file SAXExceptions.inl.
{ return (this->message_ == 0 ? ACEXML_Exception::null_ : this->message_); }
ACEXML_SAXException & ACEXML_SAXException::operator= | ( | const ACEXML_SAXException & | src | ) |
Assignment operator.
Definition at line 39 of file SAXExceptions.cpp.
{ if (this != &src) { ACE::strdelete (this->message_); this->message_ = ACE::strnew (src.message_); } return *this; }
void ACEXML_SAXException::print | ( | void | ) | const [virtual] |
Print out exception using ACE_DEBUG.
Implements ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 77 of file SAXExceptions.cpp.
{ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"), this->exception_name_, this->message())); }
const ACEXML_Char * ACEXML_SAXException::exception_name_ = ACE_TEXT ("ACEXML_SAXException") [static, protected] |
All exceptions have names. This name is used to identify the type of an exception.
Reimplemented from ACEXML_Exception.
Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.
Definition at line 69 of file SAXExceptions.h.
ACEXML_Char* ACEXML_SAXException::message_ [protected] |
A message providing more information about the exception being thrown.
Definition at line 72 of file SAXExceptions.h.