*/
class API_Exception extends Exception
{
+ const UNAUTHORIZED = 'unauthorized';
+ const NOT_IMPLEMENTED = 'not-found';
+
private $extraParams = array();
public function __construct($message, $error_code = 0, $extraParams = array(),Exception $previous = null) {
if (is_numeric ($error_code)) // using int for error code "old way")
return array(
2000 => '$params was not an array',
2001 => 'Invalid Value for Date field',
- 2100 => 'String value is longer than permitted length'
+ 2100 => 'String value is longer than permitted length',
+ self::UNAUTHORIZED => 'Unauthorized',
+ self::NOT_IMPLEMENTED => 'Entity or method is not implemented',
);
}
}