Skip to content

Commit

Permalink
Merge pull request #391 from Sorgor/exceptions-should-handle-response…
Browse files Browse the repository at this point in the history
…-codes

Exceptions should handle response codes
  • Loading branch information
raiym authored Jul 24, 2018
2 parents e70d71d + e90a3ad commit f9077dc
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 86 deletions.
6 changes: 4 additions & 2 deletions src/InstagramScraper/Exception/InstagramAuthException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace InstagramScraper\Exception;


class InstagramAuthException extends \Exception
{

public function __construct($message = "", $code = 401, $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
4 changes: 4 additions & 0 deletions src/InstagramScraper/Exception/InstagramException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

class InstagramException extends \Exception
{
public function __construct($message = "", $code = 500, $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
4 changes: 4 additions & 0 deletions src/InstagramScraper/Exception/InstagramNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

class InstagramNotFoundException extends \Exception
{
public function __construct($message = "", $code = 404, $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
Loading

0 comments on commit f9077dc

Please sign in to comment.