1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
// -*- C++ -*- $Id: SAXExceptions.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "ACEXML/common/SAXExceptions.h"
#include "ace/Log_Msg.h"
#include "ace/ACE.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_string.h"
const ACEXML_Char * ACEXML_SAXException::exception_name_ = ACE_TEXT ("ACEXML_SAXException");
const ACEXML_Char ACEXML_SAXNotSupportedException::exception_name_[] = ACE_TEXT ("ACEXML_SAXNotSupportedException");
const ACEXML_Char ACEXML_SAXNotRecognizedException::exception_name_[] = ACE_TEXT ("ACEXML_SAXNotRecognizedException");
const ACEXML_Char ACEXML_SAXParseException::exception_name_[] = ACE_TEXT ("ACEXML_SAXParseException");
#if !defined (__ACEXML_INLINE__)
# include "ACEXML/common/SAXExceptions.inl"
#endif /* __ACEXML_INLINE__ */
ACEXML_SAXException::ACEXML_SAXException (void)
: message_ (0)
{
}
ACEXML_SAXException::ACEXML_SAXException (const ACEXML_Char *msg)
: message_ (ACE::strnew (msg))
{
}
ACEXML_SAXException::ACEXML_SAXException (const ACEXML_SAXException &ex)
: ACEXML_Exception (ex),
message_ (ACE::strnew (ex.message_))
{
}
ACEXML_SAXException&
ACEXML_SAXException::operator= (const ACEXML_SAXException& src)
{
if (this != &src)
{
ACE::strdelete (this->message_);
this->message_ = ACE::strnew (src.message_);
}
return *this;
}
ACEXML_SAXException*
ACEXML_SAXException::_downcast (ACEXML_Exception* ex)
{
return dynamic_cast<ACEXML_SAXException*> (ex);
}
ACEXML_SAXException::~ACEXML_SAXException (void)
{
ACE::strdelete (this->message_);
}
ACEXML_Exception *
ACEXML_SAXException::duplicate (void) const
{
ACEXML_Exception *tmp;
ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0);
return tmp;
}
int
ACEXML_SAXException::is_a (const ACEXML_Char *name)
{
return ACE_OS::strcmp (ACEXML_SAXException::exception_name_, name) == 0
|| this->ACEXML_Exception::is_a (name);
}
void
ACEXML_SAXException::print (void) const
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
this->exception_name_, this->message()));
}
ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (void)
{
}
ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (const ACEXML_SAXNotSupportedException &ex)
: ACEXML_SAXException (ex)
{
}
ACEXML_SAXNotSupportedException&
ACEXML_SAXNotSupportedException::operator= (const
ACEXML_SAXNotSupportedException &ex)
{
this->ACEXML_SAXException::operator= (ex);
return *this;
}
ACEXML_SAXNotSupportedException*
ACEXML_SAXNotSupportedException::_downcast (ACEXML_Exception* ex)
{
return dynamic_cast<ACEXML_SAXNotSupportedException*> (ex);
}
ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (const ACEXML_Char* msg)
: ACEXML_SAXException (msg)
{
}
ACEXML_SAXNotSupportedException::~ACEXML_SAXNotSupportedException (void)
{
delete[] this->message_;
}
ACEXML_Exception *
ACEXML_SAXNotSupportedException::duplicate (void) const
{
ACEXML_Exception *tmp;
ACE_NEW_RETURN (tmp, ACEXML_SAXNotSupportedException (*this), 0);
return tmp;
}
int
ACEXML_SAXNotSupportedException::is_a (const ACEXML_Char *name)
{
return ACE_OS::strcmp (ACEXML_SAXNotSupportedException::exception_name_,
name) == 0
|| this->ACEXML_SAXException::is_a (name);
}
void
ACEXML_SAXNotSupportedException::print (void) const
{
ACE_DEBUG ((LM_ERROR,
ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
this->exception_name_, this->message()));
}
ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (void)
{
}
ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (const ACEXML_Char *msg)
: ACEXML_SAXException (msg)
{
}
ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (const ACEXML_SAXNotRecognizedException &ex)
: ACEXML_SAXException (ex)
{
}
ACEXML_SAXNotRecognizedException&
ACEXML_SAXNotRecognizedException::operator= (const ACEXML_SAXNotRecognizedException &ex)
{
this->ACEXML_SAXException::operator= (ex);
return *this;
}
ACEXML_SAXNotRecognizedException*
ACEXML_SAXNotRecognizedException::_downcast (ACEXML_Exception* ex)
{
return dynamic_cast<ACEXML_SAXNotRecognizedException*> (ex);
}
ACEXML_SAXNotRecognizedException::~ACEXML_SAXNotRecognizedException (void)
{
}
ACEXML_Exception *
ACEXML_SAXNotRecognizedException::duplicate (void) const
{
ACEXML_Exception *tmp;
ACE_NEW_RETURN (tmp, ACEXML_SAXNotRecognizedException (*this), 0);
return tmp;
}
int
ACEXML_SAXNotRecognizedException::is_a (const ACEXML_Char *name)
{
return ACE_OS::strcmp (ACEXML_SAXNotRecognizedException::exception_name_,
name) == 0
|| this->ACEXML_SAXException::is_a (name);
}
void
ACEXML_SAXNotRecognizedException::print (void) const
{
ACE_DEBUG ((LM_ERROR,
ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
this->exception_name_, this->message()));
}
ACEXML_SAXParseException::ACEXML_SAXParseException (void)
{
}
ACEXML_SAXParseException::ACEXML_SAXParseException (const ACEXML_Char *msg)
: ACEXML_SAXException (msg)
{
}
ACEXML_SAXParseException::ACEXML_SAXParseException (const ACEXML_SAXParseException &ex)
: ACEXML_SAXException (ex)
{
}
ACEXML_SAXParseException&
ACEXML_SAXParseException::operator= (const ACEXML_SAXParseException &ex)
{
this->ACEXML_SAXException::operator= (ex);
return *this;
}
ACEXML_SAXParseException*
ACEXML_SAXParseException::_downcast (ACEXML_Exception* ex)
{
return dynamic_cast<ACEXML_SAXParseException*> (ex);
}
ACEXML_SAXParseException::~ACEXML_SAXParseException (void)
{
}
ACEXML_Exception *
ACEXML_SAXParseException::duplicate (void) const
{
ACEXML_Exception *tmp;
ACE_NEW_RETURN (tmp, ACEXML_SAXParseException (*this), 0);
return tmp;
}
int
ACEXML_SAXParseException::is_a (const ACEXML_Char *name)
{
return ACE_OS::strcmp (ACEXML_SAXParseException::exception_name_,
name) == 0
|| this->ACEXML_SAXException::is_a (name);
}
void
ACEXML_SAXParseException::print (void) const
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
this->exception_name_, this->message()));
}
|