input/tidal/Error: add method IsInvalidSession()
This commit is contained in:
parent
4398101706
commit
e8e6357b73
|
@ -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:
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue