From 016856edaff3086433ed564be6d830feab24e65c Mon Sep 17 00:00:00 2001 From: badaix Date: Mon, 31 Aug 2015 23:38:28 +0200 Subject: [PATCH] removed errorCode --- common/snapException.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/common/snapException.h b/common/snapException.h index 981373e8..b3a886d8 100644 --- a/common/snapException.h +++ b/common/snapException.h @@ -26,15 +26,14 @@ // text_exception uses a dynamically-allocated internal c-string for what(): class SnapException : public std::exception { char* text_; - int errorCode_; public: - SnapException(const char* text, int errorCode = 0) : errorCode_(errorCode) + SnapException(const char* text) { text_ = new char[std::strlen(text) + 1]; std::strcpy(text_, text); } - SnapException(const std::string& text, int errorCode = 0) : errorCode_(errorCode) + SnapException(const std::string& text) { text_ = new char[text.size()]; std::strcpy(text_, text.c_str()); @@ -55,11 +54,6 @@ public: { return text_; } - - virtual int errorCode() const noexcept - { - return errorCode_; - } };