aboutsummaryrefslogtreecommitdiff
path: root/src/xmlexception.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-26 14:36:57 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-26 14:36:57 +0000
commita820665eea71a64b40e74ed24afeaf07a7a99db4 (patch)
tree515af31ac2ed78aa92ce7e90e478bdb452e6e438 /src/xmlexception.h
parentbd5bb1ca60a6a97b110cbf221b3625e6e6200141 (diff)
downloadlibbu++-a820665eea71a64b40e74ed24afeaf07a7a99db4.tar.gz
libbu++-a820665eea71a64b40e74ed24afeaf07a7a99db4.tar.bz2
libbu++-a820665eea71a64b40e74ed24afeaf07a7a99db4.tar.xz
libbu++-a820665eea71a64b40e74ed24afeaf07a7a99db4.zip
Added the first of many unit tests. For now the unit tests are just built with
everything else in the all target of the makefile, which is fine, but relies on CppTest, which can be found at http://cpptest.sf.net Also fixed some things I've been meaning to get to for a while in the xml system, including a few bugs that will make coping with malformed data not hang other programs, and do the error reporting in a nice way.
Diffstat (limited to 'src/xmlexception.h')
-rw-r--r--src/xmlexception.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/xmlexception.h b/src/xmlexception.h
new file mode 100644
index 0000000..9437ba3
--- /dev/null
+++ b/src/xmlexception.h
@@ -0,0 +1,34 @@
1#ifndef XML_EXCEPTION_H
2#define XML_EXCEPTION_H
3
4#include <string>
5#include "exception.h"
6#include <stdarg.h>
7
8/**
9 * A generalized Exception base class. This is nice for making general and
10 * flexible child classes that can create new error code classes.
11 */
12class XmlException : public Exception
13{
14public:
15 /**
16 * Construct an exception with an error code of zero, but with a
17 * description. The use of this is not reccomended most of the time, it's
18 * generally best to include an error code with the exception so your
19 * program can handle the exception in a better way.
20 * @param sFormat The format of the text. See printf for more info.
21 */
22 XmlException( const char *sFormat, ... ) throw();
23
24 /**
25 *
26 * @param nCode
27 * @param sFormat
28 */
29 XmlException( int nCode, const char *sFormat, ... ) throw();
30
31 XmlException( int nCode=0 ) throw();
32};
33
34#endif