summaryrefslogtreecommitdiffstats
path: root/src/Net
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-06-04 22:23:07 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-06-04 22:23:07 +0200
commit0b27c37fe95c6aced613d51a3624f8930a96ad3f (patch)
tree5cb92568f70fe9789e99633ec71048389efb7fa4 /src/Net
parent50d92f64547c5c06851976ceab5ed631ec93f647 (diff)
downloadmad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.tar
mad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.zip
RequestHandler-Interface ?berarbeitet
Diffstat (limited to 'src/Net')
-rw-r--r--src/Net/Exception.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Net/Exception.h b/src/Net/Exception.h
index 8522528..1ddf5f4 100644
--- a/src/Net/Exception.h
+++ b/src/Net/Exception.h
@@ -42,9 +42,9 @@ class Exception {
long subSubCode;
public:
- Exception(const std::string &where0, ErrorCode errorCode0, long subCode0 = 0, long subSubCode0 = 0)
+ Exception(const std::string &where0, ErrorCode errorCode0 = SUCCESS, long subCode0 = 0, long subSubCode0 = 0)
: where(where0), errorCode(errorCode0), subCode(subCode0), subSubCode(subSubCode0) {}
- Exception(ErrorCode errorCode0, long subCode0 = 0, long subSubCode0 = 0) : errorCode(errorCode0), subCode(subCode0), subSubCode(subSubCode0) {}
+ Exception(ErrorCode errorCode0 = SUCCESS, long subCode0 = 0, long subSubCode0 = 0) : errorCode(errorCode0), subCode(subCode0), subSubCode(subSubCode0) {}
virtual ~Exception() {}
const std::string& getWhere() const {return where;}
@@ -53,6 +53,10 @@ class Exception {
long getSubSubCode() const {return subSubCode;}
std::string strerror() const;
+
+ operator bool() const {
+ return (errorCode != SUCCESS);
+ }
};
}