X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2FException.php;h=48d89e7572e38097ac56c65b6ac64a6ffee3ddbc;hb=20ca0fdec100018fdda6ae0f53f162c5e4936e3e;hp=ea4705820e010eeb8997a1ef0eb8cd6996d4dfdb;hpb=95d68223ab15e3dc0e57d517e33545f32b9b0a11;p=civicrm-core.git diff --git a/api/Exception.php b/api/Exception.php index ea4705820e..48d89e7572 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -5,7 +5,7 @@ * @package CiviCRM_APIv3 * @subpackage API * - * @copyright CiviCRM LLC (c) 2004-2013 + * @copyright CiviCRM LLC (c) 2004-2014 */ /** @@ -21,6 +21,9 @@ */ 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") @@ -44,7 +47,9 @@ class API_Exception extends Exception 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', ); } }