00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _ACEXML_EXCEPTION_H_
00014 #define _ACEXML_EXCEPTION_H_
00015
00016 #include "ace/pre.h"
00017 #include "ACEXML/common/ACEXML_Export.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif
00022
00023 #include "ACEXML/common/XML_Types.h"
00024 #include "ACEXML/common/XML_Macros.h"
00025
00026 #if defined (ACE_USES_NATIVE_EXCEPTIONS)
00027 # define ACEXML_RAISE(EXCEPTION) throw EXCEPTION
00028 #else
00029 # define ACEXML_RAISE(EXCEPTION)
00030 #endif
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 class ACEXML_Export ACEXML_Exception
00045 {
00046 public:
00047
00048
00049 virtual ~ACEXML_Exception (void);
00050
00051
00052 virtual void _raise (void) = 0;
00053
00054
00055 static ACEXML_Exception* _downcast (ACEXML_Exception* ex);
00056
00057
00058 virtual const ACEXML_Char *id (void) const ;
00059
00060
00061 virtual ACEXML_Exception *duplicate (void) const = 0;
00062
00063
00064 virtual int is_a (const ACEXML_Char *name);
00065
00066
00067 virtual void print (void) = 0;
00068
00069 protected:
00070
00071 ACEXML_Exception (void);
00072
00073
00074
00075 static const ACEXML_Char *exception_name_;
00076
00077
00078 static const ACEXML_Char *null_;
00079 };
00080
00081 #if defined (__ACEXML_INLINE__)
00082 # include "ACEXML/common/Exception.i"
00083 #endif
00084
00085 #include "ace/post.h"
00086
00087 #endif