input/tidal: add exception class TidalError

Allows catchers to inspect the HTTP status.
This commit is contained in:
Max Kellermann
2018-01-24 12:44:57 +01:00
parent c7c087a0d2
commit 2e1481f49d
4 changed files with 58 additions and 4 deletions

View File

@@ -30,7 +30,8 @@ template<typename T> struct ConstBuffer;
struct StringView;
/**
* Parse an error JSON response.
* Parse an error JSON response and throw a #TidalError upon
* completion.
*/
class TidalErrorParser final : public YajlResponseParser {
const unsigned status;