5 * @author Galen Grover <galenjr@gmail.com>
6 * @license http://opensource.org/licenses/mit-license.php The MIT License
9 namespace Instagram\Core;
14 * This exception type will be thrown for any API error
16 * {@link https://github.com/galen/PHP-Instagram-API/blob/master/Examples/index.php#L48}
18 class ApiException extends \Exception {
23 const TYPE_NOT_ALLOWED = 'APINotAllowedError';
28 const TYPE_OAUTH = 'OAuthAccessTokenException';
40 * @param string $message Error message
41 * @param integer $code Error code
42 * @param string $type Error type
43 * @param Exception $previous Previous exception
45 public function __construct( $message = null, $code = 0, $type = null, \Exception $previous = null ) {
47 parent::__construct( $message, $code, $previous );
53 * @return string Get teh error type
55 public function getType() {