aboutsummaryrefslogtreecommitdiff
path: root/src/exceptionbase.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-26 19:16:58 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-26 19:16:58 +0000
commit579c3ac445043122b0a702bdb2542d9ea404b62e (patch)
treea96017529296f52a357e25de37b8c4cd052bebf5 /src/exceptionbase.h
parent9e27762c2b4c1baf5b2aff003fbc56236fd742e6 (diff)
downloadlibbu++-579c3ac445043122b0a702bdb2542d9ea404b62e.tar.gz
libbu++-579c3ac445043122b0a702bdb2542d9ea404b62e.tar.bz2
libbu++-579c3ac445043122b0a702bdb2542d9ea404b62e.tar.xz
libbu++-579c3ac445043122b0a702bdb2542d9ea404b62e.zip
Exceptions have been re-worked, and are easier to use, and don't collide with
system includues anymore.
Diffstat (limited to '')
-rw-r--r--src/exceptionbase.h (renamed from src/exception.h)22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/exception.h b/src/exceptionbase.h
index 1234bef..c0ced37 100644
--- a/src/exception.h
+++ b/src/exceptionbase.h
@@ -1,5 +1,5 @@
1#ifndef EXCEPTION_H 1#ifndef EXCEPTION_BASE_H
2#define EXCEPTION_H 2#define EXCEPTION_BASE_H
3 3
4#include <string> 4#include <string>
5#include <exception> 5#include <exception>
@@ -9,7 +9,7 @@
9 * A generalized Exception base class. This is nice for making general and 9 * A generalized Exception base class. This is nice for making general and
10 * flexible child classes that can create new error code classes. 10 * flexible child classes that can create new error code classes.
11 */ 11 */
12class Exception : public std::exception 12class ExceptionBase : public std::exception
13{ 13{
14public: 14public:
15 /** 15 /**
@@ -19,27 +19,27 @@ public:
19 * program can handle the exception in a better way. 19 * program can handle the exception in a better way.
20 * @param sFormat The format of the text. See printf for more info. 20 * @param sFormat The format of the text. See printf for more info.
21 */ 21 */
22 Exception( const char *sFormat, ... ) throw(); 22 ExceptionBase( const char *sFormat, ... ) throw();
23 23
24 /** 24 /**
25 * 25 *
26 * @param nCode 26 * @param nCode
27 * @param sFormat 27 * @param sFormat
28 */ 28 */
29 Exception( int nCode, const char *sFormat, ... ) throw(); 29 ExceptionBase( int nCode, const char *sFormat, ... ) throw();
30 30
31 /** 31 /**
32 * 32 *
33 * @param nCode 33 * @param nCode
34 * @return 34 * @return
35 */ 35 */
36 Exception( int nCode=0 ) throw(); 36 ExceptionBase( int nCode=0 ) throw();
37 37
38 /** 38 /**
39 * 39 *
40 * @return 40 * @return
41 */ 41 */
42 virtual ~Exception() throw(); 42 virtual ~ExceptionBase() throw();
43 43
44 /** 44 /**
45 * 45 *
@@ -66,7 +66,7 @@ private:
66}; 66};
67 67
68#define subExceptionDecl( name ) \ 68#define subExceptionDecl( name ) \
69class name : public Exception \ 69class name : public ExceptionBase \
70{ \ 70{ \
71 public: \ 71 public: \
72 name( const char *sFormat, ... ) throw (); \ 72 name( const char *sFormat, ... ) throw (); \
@@ -76,7 +76,7 @@ class name : public Exception \
76 76
77#define subExceptionDef( name ) \ 77#define subExceptionDef( name ) \
78name::name( const char *lpFormat, ... ) throw() : \ 78name::name( const char *lpFormat, ... ) throw() : \
79 Exception( 0 ) \ 79 ExceptionBase( 0 ) \
80{ \ 80{ \
81 va_list ap; \ 81 va_list ap; \
82 va_start( ap, lpFormat ); \ 82 va_start( ap, lpFormat ); \
@@ -84,7 +84,7 @@ name::name( const char *lpFormat, ... ) throw() : \
84 va_end( ap ); \ 84 va_end( ap ); \
85} \ 85} \
86name::name( int nCode, const char *lpFormat, ... ) throw() : \ 86name::name( int nCode, const char *lpFormat, ... ) throw() : \
87 Exception( nCode ) \ 87 ExceptionBase( nCode ) \
88{ \ 88{ \
89 va_list ap; \ 89 va_list ap; \
90 va_start( ap, lpFormat ); \ 90 va_start( ap, lpFormat ); \
@@ -92,7 +92,7 @@ name::name( int nCode, const char *lpFormat, ... ) throw() : \
92 va_end( ap ); \ 92 va_end( ap ); \
93} \ 93} \
94name::name( int nCode ) throw() : \ 94name::name( int nCode ) throw() : \
95 Exception( nCode ) \ 95 ExceptionBase( nCode ) \
96{ \ 96{ \
97} 97}
98 98