X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fphp-instagram-api%2Fphp-instagram-api%2FInstagram%2FCore%2FApiException.php;fp=vendor%2Fphp-instagram-api%2Fphp-instagram-api%2FInstagram%2FCore%2FApiException.php;h=ccb250b42fd25efafec2858c7822d19c540cdbcc;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/php-instagram-api/php-instagram-api/Instagram/Core/ApiException.php b/vendor/php-instagram-api/php-instagram-api/Instagram/Core/ApiException.php new file mode 100644 index 000000000..ccb250b42 --- /dev/null +++ b/vendor/php-instagram-api/php-instagram-api/Instagram/Core/ApiException.php @@ -0,0 +1,59 @@ + +* @license http://opensource.org/licenses/mit-license.php The MIT License +*/ + +namespace Instagram\Core; + +/** + * API Exception + * + * This exception type will be thrown for any API error + * + * {@link https://github.com/galen/PHP-Instagram-API/blob/master/Examples/index.php#L48} + */ +class ApiException extends \Exception { + + /** + * Invalid APU URI + */ + const TYPE_NOT_ALLOWED = 'APINotAllowedError'; + + /** + * Authorization error + */ + const TYPE_OAUTH = 'OAuthAccessTokenException'; + + /** + * Type of error + * + * @var string + */ + protected $type; + + /** + * Constructor + * + * @param string $message Error message + * @param integer $code Error code + * @param string $type Error type + * @param Exception $previous Previous exception + */ + public function __construct( $message = null, $code = 0, $type = null, \Exception $previous = null ) { + $this->type = $type; + parent::__construct( $message, $code, $previous ); + } + + /** + * Get error type + * + * @return string Get teh error type + */ + public function getType() { + return $this->type; + } + +} \ No newline at end of file