Fixed the Logging system to actually be able to handle errors. Database is also fixed to use directories.
This commit is contained in:
@@ -91,19 +91,19 @@ namespace ehs
|
||||
|
||||
if (authRes.GetCode() == 400)
|
||||
{
|
||||
EHS_LOG_INT("Error", 0, "Could not authorize with Spotify because the client id was invalid.");
|
||||
EHS_LOG_INT(LogType::ERR, 0, "Could not authorize with Spotify because the client id was invalid.");
|
||||
|
||||
return false;
|
||||
}
|
||||
else if (authRes.GetCode() == 403)
|
||||
{
|
||||
EHS_LOG_INT("Error", 1, "Could not authorize with Spotify because the secret was invalid.");
|
||||
EHS_LOG_INT(LogType::ERR, 1, "Could not authorize with Spotify because the secret was invalid.");
|
||||
|
||||
return false;
|
||||
}
|
||||
else if (authRes.GetCode() != 200)
|
||||
{
|
||||
EHS_LOG_INT("Error", 2, "Could not authorize with Spotify with code " + Str_8::FromNum(authRes.GetCode()) + ".");
|
||||
EHS_LOG_INT(LogType::ERR, 2, "Could not authorize with Spotify with code " + Str_8::FromNum(authRes.GetCode()) + ".");
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -608,7 +608,7 @@ namespace ehs
|
||||
|
||||
if (res.GetCode() != 200)
|
||||
{
|
||||
EHS_LOG_INT("Error", 0, "Failed to reauthorize with Spotify with code #" + Str_8::FromNum(res.GetCode()) + ".");
|
||||
EHS_LOG_INT(LogType::ERR, 0, "Failed to reauthorize with Spotify with code #" + Str_8::FromNum(res.GetCode()) + ".");
|
||||
client.Release();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user