Commit e8e6357b authored by Max Kellermann's avatar Max Kellermann

input/tidal/Error: add method IsInvalidSession()

parent 43981017
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
/** /**
* An error condition reported by the server. * An error condition reported by the server.
*
* See http://developer.tidal.com/technical/errors/ for details (login
* required).
*/ */
class TidalError : public std::runtime_error { class TidalError : public std::runtime_error {
/** /**
...@@ -52,6 +55,10 @@ public: ...@@ -52,6 +55,10 @@ public:
unsigned GetSubStatus() const noexcept { unsigned GetSubStatus() const noexcept {
return sub_status; return sub_status;
} }
bool IsInvalidSession() const noexcept {
return sub_status == 6001 || sub_status == 6002;
}
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment