X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2FException.php;h=8c6ca5ba73d26c9e04381065d2416509547692f6;hb=1d7a41bf759575369703cadd1ba0c6bae156d54d;hp=1b5d544f8e15a6c0c2b2020e15e9317368ded74c;hpb=e9aca61e8b08d5ae372621c4397108b8f2ec28ba;p=civicrm-core.git diff --git a/api/Exception.php b/api/Exception.php index 1b5d544f8e..8c6ca5ba73 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -1,16 +1,20 @@ extraParams = $extraParams + array('error_code' => $error_code); } - // custom string representation of object /** + * Custom string representation of object. + * * @return string */ public function __toString() { @@ -52,6 +59,8 @@ class API_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { @@ -59,6 +68,8 @@ class API_Exception extends Exception { } /** + * Get error codes. + * * @return array */ public function getErrorCodes() { @@ -70,6 +81,7 @@ class API_Exception extends Exception { self::NOT_IMPLEMENTED => 'Entity or method is not implemented', ); } + } /** @@ -80,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 @@ -97,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() { @@ -106,6 +121,8 @@ class CiviCRM_API3_Exception extends Exception { } /** + * Get error code. + * * @return mixed */ public function getErrorCode() { @@ -113,9 +130,12 @@ class CiviCRM_API3_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { return $this->extraParams; } + }