From 0b27c37fe95c6aced613d51a3624f8930a96ad3f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 4 Jun 2009 22:23:07 +0200 Subject: RequestHandler-Interface ?berarbeitet --- src/Net/Exception.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Net') 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); + } }; } -- cgit v1.2.3