/**
* Drop all CiviCRM tables.
*
- * @throws \CRM_Exception
+ * @throws \CRM_Core_Exception
*/
public static function dropAllTables() {
require_once 'Log.php';
-/**
- * Class CRM_Exception
- */
-class CRM_Exception extends PEAR_Exception {
-
- /**
- * Redefine the exception so message isn't optional.
- *
- * Supported signatures:
- * - PEAR_Exception(string $message);
- * - PEAR_Exception(string $message, int $code);
- * - PEAR_Exception(string $message, Exception $cause);
- * - PEAR_Exception(string $message, Exception $cause, int $code);
- * - PEAR_Exception(string $message, PEAR_Error $cause);
- * - PEAR_Exception(string $message, PEAR_Error $cause, int $code);
- * - PEAR_Exception(string $message, array $causes);
- * - PEAR_Exception(string $message, array $causes, int $code);
- *
- * @param string $message exception message
- * @param int $code
- * @param Exception $previous
- */
- public function __construct($message = NULL, $code = 0, Exception $previous = NULL) {
- parent::__construct($message, $code, $previous);
- }
-
-}
-
/**
* Class CRM_Core_Error
*/
if (FALSE === file_get_contents($fileName)) {
// Our file cannot be found.
// Using 'die' here breaks this on extension upgrade.
- throw new CRM_Exception('Could not find the SQL file.');
+ throw new CRM_Core_Exception('Could not find the SQL file.');
}
self::runSqlQuery($dsn, file_get_contents($fileName), $prefix, $dieOnErrors);
try {
$result = civicrm_api3('contact', 'get', []);
}
- catch (CRM_Exception $e) {
+ catch (CRM_Core_Exception $e) {
$this->fail("This should have been a success test");
}
$this->assertTrue(is_array($result));