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)
 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 .

virtual void print (void)
 Print out exception using ACE_DEBUG.


Static Public Member Functions

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

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.

References ACEXML_Char.

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 58 of file SAXExceptions.cpp.

References message_.

00059 {
00060   delete[] this->message_;
00061 }


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.

References ACE_TEXT, and ACEXML_Exception::is_a().

00052 {
00053   if (ex->is_a (ACE_TEXT ("ACEXML_SAXException")))
00054     return dynamic_cast<ACEXML_SAXException*> (ex);
00055   return 0;
00056 }

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.i.

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 66 of file SAXExceptions.cpp.

References ACE_NEW_RETURN.

00067 {
00068   ACEXML_Exception *tmp;
00069   ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0);
00070   return tmp;
00071 }

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.i.

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 .

Reimplemented from ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.

Definition at line 74 of file SAXExceptions.cpp.

References ACEXML_Char, 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().

00075 {
00076   return ACE_OS::strcmp (ACEXML_SAXException::exception_name_, name) == 0
00077     || this->ACEXML_Exception::is_a (name);
00078 }

ACEXML_INLINE const ACEXML_Char * ACEXML_SAXException::message void   ) 
 

Return the extra message accompanying the exception.

Definition at line 4 of file SAXExceptions.i.

References message_.

Referenced by operator=().

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 ACEXML_Char, exception_name_, message(), and message_.

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

00040 {
00041   ACEXML_SAXException temp (src);
00042   ACEXML_Char* message = this->message_;
00043   this->exception_name_ = temp.exception_name_;
00044   this->message_ = temp.message_;
00045   temp.message_ = message;
00046   return *this;
00047 }

void ACEXML_SAXException::print void   )  [virtual]
 

Print out exception using ACE_DEBUG.

Implements ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException, ACEXML_SAXNotRecognizedException, and ACEXML_SAXParseException.

Definition at line 81 of file SAXExceptions.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

00082 {
00083   ACE_ERROR ((LM_ERROR,
00084               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00085               this->exception_name_, this->message()));
00086 }


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 9 of file SAXExceptions.cpp.

Referenced by id(), is_a(), and operator=().

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 message(), operator=(), and ~ACEXML_SAXException().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:48:06 2006 for ACEXML by doxygen 1.3.6