Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 Methods

 ACEXML_SAXException (void)
 Default constructor. More...

 ACEXML_SAXException (const ACEXML_Char *msg)
 Constructor initializing the exception message. More...

ACEXML_SAXException & operator= (const ACEXML_SAXException &src)
 Assignment operator. More...

 ACEXML_SAXException (const ACEXML_SAXException &ex)
 Copy constructor. More...

virtual ~ACEXML_SAXException (void)
 Destructor. More...

virtual void _raise (void)
 Throw the exception. More...

virtual const ACEXML_Charid (void) const
 Return the name of the exception. More...

const ACEXML_Charmessage (void)
 Return the extra message accompanying the exception. More...

virtual ACEXML_Exceptionduplicate (void) const
 Dynamically create a copy of this exception. More...

virtual int is_a (const ACEXML_Char *name)
 Check whether this is an exception of type specified by <name>. More...

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


Static Public Methods

ACEXML_SAXException * _downcast (ACEXML_Exception *ex)
 Static narrow operation. More...


Protected Attributes

ACEXML_Charmessage_
 A message providing more information about the exception being thrown. More...


Static Protected Attributes

const ACEXML_Charexception_name_ = ACEXML_SAXException_name
 All exceptions have names. This name is used to identify the type of an exception. More...


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

00041   : message_ (0)
00042 {
00043 }

ACEXML_SAXException::ACEXML_SAXException const ACEXML_Char   msg
 

Constructor initializing the exception message.

Definition at line 45 of file SAXExceptions.cpp.

References ACEXML_Char.

00046   : message_ (ACE::strnew (msg))
00047 {
00048 }

ACEXML_SAXException::ACEXML_SAXException const ACEXML_SAXException &    ex
 

Copy constructor.

Definition at line 50 of file SAXExceptions.cpp.

00051   : ACEXML_Exception (ex),
00052     message_ (ACE::strnew (ex.message_))
00053 
00054 {
00055 }

ACEXML_SAXException::~ACEXML_SAXException void    [virtual]
 

Destructor.

Definition at line 77 of file SAXExceptions.cpp.

References message_.

00078 {
00079   delete[] this->message_;
00080 }


Member Function Documentation

ACEXML_SAXException * ACEXML_SAXException::_downcast ACEXML_Exception   ex [static]
 

Static narrow operation.

Reimplemented from ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException.

Definition at line 70 of file SAXExceptions.cpp.

References ACE_TEXT, and ACEXML_Exception::is_a.

00071 {
00072   if (ex->is_a (ACE_TEXT ("ACEXML_SAXException")))
00073     return ACE_dynamic_cast (ACEXML_SAXException*, ex);
00074   return 0;
00075 }

ACEXML_INLINE void ACEXML_SAXException::_raise void    [virtual]
 

Throw the exception.

Implements ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException.

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.

Definition at line 85 of file SAXExceptions.cpp.

References ACE_NEW_RETURN.

00086 {
00087   ACEXML_Exception *tmp;
00088   ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0);
00089   return tmp;
00090 }

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.

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

Implements ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException.

Definition at line 93 of file SAXExceptions.cpp.

References ACEXML_Char, ACEXML_Exception::exception_name_, exception_name_, ACEXML_Exception::is_a, and ACE_OS_String::strcmp.

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

00094 {
00095   if (name == ACEXML_SAXException::exception_name_
00096       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00097                          name) == 0)
00098     return 1;
00099   else
00100     return this->ACEXML_Exception::is_a (name);
00101 
00102   ACE_NOTREACHED (return 0;)
00103 }

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_, and ACEXML_Exception::null_.

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

References ACEXML_Char, exception_name_, message, and message_.

00059 {
00060   ACEXML_SAXException temp (src);
00061   ACEXML_Char* message = this->message_;
00062   this->exception_name_ = temp.exception_name_;
00063   this->message_ = temp.message_;
00064   temp.message_ = message;
00065   return *this;
00066 }

void ACEXML_SAXException::print void    [virtual]
 

Print out exception using ACE_DEBUG.

Implements ACEXML_Exception.

Reimplemented in ACEXML_SAXNotSupportedException.

Definition at line 106 of file SAXExceptions.cpp.

References ACE_DEBUG, ACE_TEXT, and LM_ERROR.

00107 {
00108     ACE_DEBUG ((LM_ERROR,
00109               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00110               this->exception_name_, this->message()));
00111 }


Member Data Documentation

const ACEXML_Char * ACEXML_SAXException::exception_name_ = ACEXML_SAXException_name [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.

Definition at line 11 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=, ~ACEXML_SAXException, ACEXML_SAXNotRecognizedException::~ACEXML_SAXNotRecognizedException, and ACEXML_SAXNotSupportedException::~ACEXML_SAXNotSupportedException.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:27:25 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002