mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-18 11:36:14 +02:00
removed errorCode
This commit is contained in:
parent
442263af31
commit
016856edaf
1 changed files with 2 additions and 8 deletions
|
@ -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_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue