summaryrefslogtreecommitdiff
path: root/src/exceptionbase.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-07-13 02:07:33 +0000
committerMike Buland <eichlan@xagasoft.com>2007-07-13 02:07:33 +0000
commit2741e16c129e8c70bad2cb47e5a97083dd4d3c85 (patch)
tree5e7c6e1a801ce0eb9fecfc7e35f780e5d60335c3 /src/exceptionbase.h
parent56d26456174cf9abd58fec38bfd700ed08ec73d8 (diff)
downloadlibbu++-2741e16c129e8c70bad2cb47e5a97083dd4d3c85.tar.gz
libbu++-2741e16c129e8c70bad2cb47e5a97083dd4d3c85.tar.bz2
libbu++-2741e16c129e8c70bad2cb47e5a97083dd4d3c85.tar.xz
libbu++-2741e16c129e8c70bad2cb47e5a97083dd4d3c85.zip
More updates to the Exception macros.
Diffstat (limited to 'src/exceptionbase.h')
-rw-r--r--src/exceptionbase.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/exceptionbase.h b/src/exceptionbase.h
index 4cdbf36..f2543e4 100644
--- a/src/exceptionbase.h
+++ b/src/exceptionbase.h
@@ -89,6 +89,15 @@ class name : public Bu::ExceptionBase \
89 name( int nCode=0 ) throw (); \ 89 name( int nCode=0 ) throw (); \
90}; 90};
91 91
92#define subExceptionDeclChild( name, parent ) \
93class name : public parent \
94{ \
95 public: \
96 name( const char *sFormat, ... ) throw (); \
97 name( int nCode, const char *sFormat, ... ) throw(); \
98 name( int nCode=0 ) throw (); \
99};
100
92#define subExceptionDeclBegin( name ) \ 101#define subExceptionDeclBegin( name ) \
93class name : public Bu::ExceptionBase \ 102class name : public Bu::ExceptionBase \
94{ \ 103{ \
@@ -122,4 +131,26 @@ name::name( int nCode ) throw() : \
122{ \ 131{ \
123} 132}
124 133
134#define subExceptionDefChild( name, parent ) \
135name::name( const char *lpFormat, ... ) throw() : \
136 parent( 0 ) \
137{ \
138 va_list ap; \
139 va_start( ap, lpFormat ); \
140 setWhat( lpFormat, ap ); \
141 va_end( ap ); \
142} \
143name::name( int nCode, const char *lpFormat, ... ) throw() : \
144 parent( nCode ) \
145{ \
146 va_list ap; \
147 va_start( ap, lpFormat ); \
148 setWhat( lpFormat, ap ); \
149 va_end( ap ); \
150} \
151name::name( int nCode ) throw() : \
152 parent( nCode ) \
153{ \
154}
155
125#endif 156#endif