Permalink
Browse files

BackwardsCompatibilityBreak - Renamed fPrintableException to fException

  • Loading branch information...
wbond committed Nov 16, 2008
1 parent 6f843fd commit 45d33aa6f6ec60e3cea0a04195aba4295d0ca3b4
@@ -688,7 +688,7 @@ public function delete()
unset($this->old_values[$pk_columns[0]]);
}
} catch (fPrintableException $e) {
} catch (fException $e) {
if (!$inside_db_transaction) {
fORMDatabase::retrieve()->translatedQuery('ROLLBACK');
}
@@ -1602,7 +1602,7 @@ public function store()
$this->cache
);
} catch (fPrintableException $e) {
} catch (fException $e) {
if (!$inside_db_transaction) {
fORMDatabase::retrieve()->translatedQuery('ROLLBACK');
View
@@ -364,10 +364,10 @@ static public function redirectWithLoadedValues()
/**
* Removes list items from an fPrintableException based on their contents
* Removes list items from an fException based on their contents
*
* @param fPrintableException $exception The exception to remove field names from
* @param array $filters An array of strings to search for, if a string is found in a list item, the list item will be removed
* @param fException $exception The exception to remove field names from
* @param array $filters An array of strings to search for, if a string is found in a list item, the list item will be removed
* @return void
*/
static public function removeListItems($exception, $filters)
@@ -401,10 +401,10 @@ static public function removeListItems($exception, $filters)
/**
* Reorders list items in an fPrintableException based on their contents
* Reorders list items in an fException based on their contents
*
* @param fPrintableException $exception The exception to reorder the list items in
* @param array $matches This should be an ordered array of strings. If a list item contains the string it will be displayed in the relative order it occurs in this array.
* @param fException $exception The exception to reorder the list items in
* @param array $matches This should be an ordered array of strings. If a list item contains the string it will be displayed in the relative order it occurs in this array.
* @return void
*/
static public function reorderListItems($exception, $matches)
View
@@ -632,14 +632,14 @@ static public function handleError($error_number, $error_string, $error_file=NUL
*/
static public function handleException($exception)
{
if ($exception instanceof fPrintableException) {
if ($exception instanceof fException) {
$message = $exception->formatTrace() . "\n" . $exception->getMessage();
} else {
$message = $exception->getTraceAsString() . "\n" . $exception->getMessage();
}
$message = self::compose("Uncaught Exception") . "\n------------------\n" . trim($message);
if (self::$exception_destination != 'html' && $exception instanceof fPrintableException) {
if (self::$exception_destination != 'html' && $exception instanceof fException) {
$exception->printMessage();
}
@@ -1,18 +1,18 @@
<?php
/**
* An exception that can easily be printed
* An exception that allows for easy l10n, printing, tracing and hooking
*
* @copyright Copyright (c) 2007-2008 William Bond
* @author William Bond [wb] <will@flourishlib.com>
* @license http://flourishlib.com/license
*
* @package Flourish
* @link http://flourishlib.com/fPrintableException
* @link http://flourishlib.com/fException
*
* @version 1.0.0b
* @changes 1.0.0b The initial implementation [wb, 2007-06-14]
*/
abstract class fPrintableException extends Exception
abstract class fException extends Exception
{
/**
* Callbacks for when exceptions are created
@@ -137,7 +137,7 @@ static protected function dump($data)
static public function registerCallback($callback, $exception_type=NULL)
{
if ($exception_type === NULL) {
$exception_type = 'fPrintableException';
$exception_type = 'fException';
}
if (!isset(self::$callbacks[$exception_type])) {
@@ -159,7 +159,7 @@ static public function registerCallback($callback, $exception_type=NULL)
* @param mixed $component A string or number to insert into the message
* @param mixed ...
* @param integer $code The exception code to set
* @return fPrintableException
* @return fException
*/
public function __construct($message)
{
@@ -181,7 +181,7 @@ public function __construct($message)
throw new Exception($message);
}
$args = array_map(array('fPrintableException', 'dump'), $args);
$args = array_map(array('fException', 'dump'), $args);
parent::__construct(
self::compose($message, $args),
@@ -12,7 +12,7 @@
* @version 1.0.0b
* @changes 1.0.0b The initial implementation [wb, 2007-06-14]
*/
abstract class fExpectedException extends fPrintableException
abstract class fExpectedException extends fException
{
}
View
@@ -59,7 +59,7 @@ static public function enableSmartCaching($cache_file)
);
}
self::retrieve()->setCacheFile($cache_file);
fPrintableException::registerCallback(array(self::retrieve(), 'flushInfo'), 'fUnexpectedException');
fException::registerCallback(array(self::retrieve(), 'flushInfo'), 'fUnexpectedException');
}
@@ -12,7 +12,7 @@
* @version 1.0.0b
* @changes 1.0.0b The initial implementation [wb, 2007-06-14]
*/
abstract class fUnexpectedException extends fPrintableException
abstract class fUnexpectedException extends fException
{
/**
* Prints out a generic error message inside of a `div` with the class being `'exception {exception_class_name}'`

0 comments on commit 45d33aa

Please sign in to comment.