aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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