ACEXML_SAXException Class Reference

ACEXML_SAXException. More...

#include <ACEXML/common/SAXExceptions.h>

Inheritance diagram for ACEXML_SAXException:

Inheritance graph
[legend]
Collaboration diagram for ACEXML_SAXException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACEXML_SAXException (void)
 Default constructor.
 ACEXML_SAXException (const ACEXML_Char *msg)
 Constructor initializing the exception message.
ACEXML_SAXExceptionoperator= (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_Charid (void) const
 Return the name of the exception.
const ACEXML_Charmessage (void) const
 Return the extra message accompanying the exception.
virtual ACEXML_Exceptionduplicate (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_Charmessage_
 A message providing more information about the exception being thrown.

Static Protected Attributes

static const ACEXML_Charexception_name_ = ACE_TEXT ("ACEXML_SAXException")

Detailed Description

ACEXML_SAXException.

ACEXML_SAXException is the mother of all SAX related exceptions.

Definition at line 32 of file SAXExceptions.h.


Constructor & Destructor Documentation

ACEXML_SAXException::ACEXML_SAXException ( void   ) 

Default constructor.

Definition at line 21 of file SAXExceptions.cpp.

00022   : message_ (0)
00023 {
00024 }

ACEXML_SAXException::ACEXML_SAXException ( const ACEXML_Char msg  ) 

Constructor initializing the exception message.

Definition at line 26 of file SAXExceptions.cpp.

00027   : message_ (ACE::strnew (msg))
00028 {
00029 }

ACEXML_SAXException::ACEXML_SAXException ( const ACEXML_SAXException ex  ) 

Copy constructor.

Definition at line 31 of file SAXExceptions.cpp.

00032   : ACEXML_Exception (ex),
00033     message_ (ACE::strnew (ex.message_))
00034 
00035 {
00036 }

ACEXML_SAXException::~ACEXML_SAXException ( void   )  [virtual]

Destructor.

Definition at line 56 of file SAXExceptions.cpp.

References ACE::strdelete().

00057 {
00058   ACE::strdelete (this->message_);
00059 }


Member Function Documentation

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.

00052 {
00053   return dynamic_cast<ACEXML_SAXException*> (ex);
00054 }

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.

References ACEXML_RAISE.

00013 {
00014   ACEXML_RAISE (*this);
00015 }

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.

References ACE_NEW_RETURN.

00063 {
00064   ACEXML_Exception *tmp;
00065   ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0);
00066   return tmp;
00067 }

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.

References exception_name_.

00037 {
00038   return ACEXML_SAXException::exception_name_;
00039 }

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.

References exception_name_, ACEXML_Exception::is_a(), and ACE_OS::strcmp().

Referenced by ACEXML_SAXParseException::is_a(), ACEXML_SAXNotRecognizedException::is_a(), and ACEXML_SAXNotSupportedException::is_a().

00071 {
00072   return ACE_OS::strcmp (ACEXML_SAXException::exception_name_, name) == 0
00073     || this->ACEXML_Exception::is_a (name);
00074 }

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.

References ACEXML_Exception::null_.

00005 {
00006   return (this->message_ == 0 ?
00007           ACEXML_Exception::null_ :
00008           this->message_);
00009 }

ACEXML_SAXException & ACEXML_SAXException::operator= ( const ACEXML_SAXException src  ) 

Assignment operator.

Definition at line 39 of file SAXExceptions.cpp.

References message_, ACE::strdelete(), and ACE::strnew().

Referenced by ACEXML_SAXParseException::operator=(), ACEXML_SAXNotRecognizedException::operator=(), and ACEXML_SAXNotSupportedException::operator=().

00040 {
00041   if (this != &src)
00042     {
00043       ACE::strdelete (this->message_);
00044       this->message_ = ACE::strnew (src.message_);
00045     }
00046 
00047   return *this;
00048 }

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.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

00078 {
00079   ACE_ERROR ((LM_ERROR,
00080               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00081               this->exception_name_, this->message()));
00082 }


Member Data Documentation

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.

Referenced by id(), and is_a().

ACEXML_Char* ACEXML_SAXException::message_ [protected]

A message providing more information about the exception being thrown.

Definition at line 72 of file SAXExceptions.h.

Referenced by operator=(), and ACEXML_SAXNotSupportedException::~ACEXML_SAXNotSupportedException().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:37:17 2010 for ACEXML by  doxygen 1.4.7