Subsonic API: better parameter/error handling

This commit is contained in:
emeric
2019-04-07 17:23:46 +02:00
parent 9ebea81104
commit b4103999a7
3 changed files with 58 additions and 34 deletions
+8 -1
View File
@@ -46,8 +46,15 @@ class Error
RequestedDataNotFound = 70,
};
enum class CustomType
{
BadId,
NotImplemented,
InternalError,
};
Error(Code code);
Error(const std::string& message);
Error(CustomType customType);
Code getCode() const { return _code; }
const std::string& getMessage() const { return _message; }