diff --git a/api/ecobee_token.php b/api/ecobee_token.php index 0f6797b..28e79f4 100644 --- a/api/ecobee_token.php +++ b/api/ecobee_token.php @@ -37,7 +37,7 @@ class ecobee_token extends cora\crud { isset($response['access_token']) === false || isset($response['refresh_token']) === false ) { - throw new Exception('Could not get first token.', 10000); + throw new cora\exception('Could not get first ecobee token.', 10000); } return [ @@ -73,7 +73,7 @@ class ecobee_token extends cora\crud { ] ); if(count($ecobee_tokens) === 0) { - throw new Exception('Could not refresh ecobee token; no token found.', 10001); + throw new cora\exception('Could not refresh ecobee token; no token found.', 10001); } $ecobee_token = $ecobee_tokens[0]; @@ -97,7 +97,7 @@ class ecobee_token extends cora\crud { $this->delete($ecobee_token['ecobee_token_id']); $this->api('user', 'log_out', ['all' => true]); $database->release_lock($lock_name); - throw new Exception('Could not refresh ecobee token; ecobee returned no token.', 10002); + throw new cora\exception('Could not refresh ecobee token; ecobee returned no token.', 10002); } $ecobee_token = $database->update( diff --git a/api/patreon_token.php b/api/patreon_token.php index fb4079e..6815836 100644 --- a/api/patreon_token.php +++ b/api/patreon_token.php @@ -37,7 +37,7 @@ class patreon_token extends cora\crud { isset($response['access_token']) === false || isset($response['refresh_token']) === false ) { - throw new Exception('Could not get first token', 10100); + throw new cora\exception('Could not get first Patreon token.', 10100); } $new_patreon_token = [ @@ -82,7 +82,7 @@ class patreon_token extends cora\crud { ] ); if(count($patreon_tokens) === 0) { - throw new Exception('Could not refresh patreon token; no token found.', 10101); + throw new cora\exception('Could not refresh Patreon token; no token found.', 10101); } $patreon_token = $patreon_tokens[0]; @@ -105,7 +105,7 @@ class patreon_token extends cora\crud { ) { $this->delete($patreon_token['patreon_token_id']); $database->release_lock($lock_name); - throw new Exception('Could not refresh patreon token; patreon returned no token.', 10102); + throw new cora\exception('Could not refresh Patreon token; Patreon returned no token.', 10102); } $database->update(