Merge pull request #5386 from colemanw/CRM-15706
[civicrm-core.git] / CRM / Core / Exception.php
index ea319b57369d3df30587d0e0d08959c1df130b4e..2722c6b73bb5cd5cafa20ca3ba591d63fe323333 100644 (file)
@@ -1,8 +1,7 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * Base class for exceptions generated by CiviCRM.
  * This Exception returns more information than the default one. We are using it from the
  * form layer to allow redirects to occur without having redirects in the BAO
- * @param string $message the human friendly error message
- * @param string $error_code a computer friendly error code. By convention, no space (but underscore allowed)
- *  ex: mandatory_missing, duplicate, invalid_format
- * @param array $data extra params to return. eg an extra array of ids. It is not mandatory, but can help the computer using the api. Keep in mind the api consumer isn't to be trusted. eg. the database password is NOT a good extra data
+ * @param string $message
+ *   The human friendly error message.
+ * @param string $error_code
+ *   A computer friendly error code. By convention, no space (but underscore allowed).
+ *   ex: mandatory_missing, duplicate, invalid_format
+ * @param array $data
+ *   Extra params to return. eg an extra array of ids. It is not mandatory, but can help the computer using the api. Keep in mind the api consumer isn't to be trusted. eg. the database password is NOT a good extra data.
  */
-
 class CRM_Core_Exception extends PEAR_Exception {
   private $errorData = array();
 
@@ -45,13 +46,13 @@ class CRM_Core_Exception extends PEAR_Exception {
    * @param array $errorData
    * @param null $previous
    */
-  public function __construct($message, $error_code = 0, $errorData = array(), $previous = null) {
+  public function __construct($message, $error_code = 0, $errorData = array(), $previous = NULL) {
     parent::__construct(ts($message));
     $this->errorData = $errorData + array('error_code' => $error_code);
   }
 
-  // custom string representation of object
   /**
+   * custom string representation of object.
    * @return string
    */
   public function __toString() {
@@ -79,5 +80,5 @@ class CRM_Core_Exception extends PEAR_Exception {
   public function getErrorData() {
     return $this->errorData;
   }
-}
 
+}