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_; - } };