Skip to content

Commit

Permalink
Rename api exception class
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomáš Kulhánek committed Feb 11, 2021
1 parent d46fe55 commit 90cddd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Driver/Browserless.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace HelpPC\ChromePdf\Driver;

use HelpPC\ChromePdf\Exception\APIException;
use HelpPC\ChromePdf\Exception\ApiException;
use Symfony\Component\HttpClient\Exception\ClientException;
use Symfony\Contracts\HttpClient;

Expand Down Expand Up @@ -214,7 +214,7 @@ private function render(array $options): string
$response = $this->client->request('POST', $this->apiUrl . $this->pdfEndpoint, $requestOptions);
return $response->getContent();
} catch (ClientException $e) {
throw new APIException("Failed to render PDF: {$e->getMessage()}", $e->getCode(), $e);
throw new ApiException("Failed to render PDF: {$e->getMessage()}", $e->getCode(), $e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace HelpPC\ChromePdf\Exception;

class APIException extends \RuntimeException
class ApiException extends \RuntimeException
{
}

0 comments on commit 90cddd6

Please sign in to comment.