X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2FException.php;h=267c87fcdc0f4fc6fcac1c4e4d9fda6a274d9de6;hb=a84f8267de4facb18a131eeeb0c5052fbb501a1d;hp=1ee7914cbf64cd30549598b861568ef28210ac02;hpb=39dfb3109e293c4d596a66e6590a1ed7650bd37e;p=civicrm-core.git diff --git a/api/Exception.php b/api/Exception.php index 1ee7914cbf..267c87fcdc 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -1,11 +1,11 @@ extraParams = $extraParams + array('error_code' => $error_code); } - // custom string representation of object /** + * Custom string representation of object. + * * @return string */ public function __toString() { @@ -56,6 +59,8 @@ class API_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { @@ -63,6 +68,8 @@ class API_Exception extends Exception { } /** + * Get error codes. + * * @return array */ public function getErrorCodes() { @@ -74,6 +81,7 @@ class API_Exception extends Exception { self::NOT_IMPLEMENTED => 'Entity or method is not implemented', ); } + } /** @@ -84,6 +92,8 @@ class CiviCRM_API3_Exception extends Exception { private $extraParams = array(); /** + * Class constructor. + * * @param string $message * The human friendly error message. * @param mixed $error_code @@ -101,8 +111,9 @@ class CiviCRM_API3_Exception extends Exception { $this->extraParams = $extraParams + array('error_code' => $error_code); } - // custom string representation of object /** + * Custom string representation of object. + * * @return string */ public function __toString() { @@ -110,6 +121,8 @@ class CiviCRM_API3_Exception extends Exception { } /** + * Get error code. + * * @return mixed */ public function getErrorCode() { @@ -117,9 +130,12 @@ class CiviCRM_API3_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { return $this->extraParams; } + }