Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Rename method "getException()" to "toException()"
Browse files Browse the repository at this point in the history
  • Loading branch information
atehnix committed Jul 24, 2016
1 parent 077ad67 commit 36e01dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ protected function getResponseData(ResponseInterface $response)
protected function checkErrors($data)
{
if (isset($data['error'])) {
throw self::getException($data['error']);
throw self::toException($data['error']);
}

if (isset($data['execute_errors'][0])) {
throw self::getException($data['execute_errors'][0]);
throw self::toException($data['execute_errors'][0]);
}
}

/**
* @param array $error
* @return VkException
*/
public static function getException($error)
public static function toException($error)
{
$message = isset($error['error_msg']) ? $error['error_msg'] : '';
$code = isset($error['error_code']) ? $error['error_code'] : 0;
Expand Down

0 comments on commit 36e01dd

Please sign in to comment.