From 136c00e881dd290d470923b0ce7760de2df5e0ad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Apr 2003 16:14:56 +0000 Subject: * Autoconf / Automake configuration and building. --- src/util.hh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/util.hh (limited to 'src/util.hh') diff --git a/src/util.hh b/src/util.hh new file mode 100644 index 0000000000..8d82c80c14 --- /dev/null +++ b/src/util.hh @@ -0,0 +1,34 @@ +#ifndef __UTIL_H +#define __UTIL_H + +#include + +using namespace std; + + +class Error : public exception +{ + string err; +public: + Error(string _err) { err = _err; } + ~Error() throw () { }; + const char * what() const throw () { return err.c_str(); } +}; + +class UsageError : public Error +{ +public: + UsageError(string _err) : Error(_err) { }; +}; + +class BadRefError : public Error +{ +public: + BadRefError(string _err) : Error(_err) { }; +}; + + +typedef vector Strings; + + +#endif /* !__UTIL_H */ -- cgit 1.4.1