<?php
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| 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.
* 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
+ * 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();
$this->errorData = $errorData + array('error_code' => $error_code);
}
- // custom string representation of object
/**
+ * custom string representation of object.
* @return string
*/
public function __toString() {
public function getErrorData() {
return $this->errorData;
}
+
}