Commit b646dfc0 authored by Taddeus Kroes's avatar Taddeus Kroes

Added FormattedException to base file

parent a43b0b3c
......@@ -66,12 +66,29 @@ abstract class Base {
}
}
/**
* Exception with sprintf()-like constructor for error message formatting.
*
* @package WebBasics
* @link http://php.net/sprintf
*/
class FormattedException extends \Exception {
/**
* Constructor, sets a formatted error message.
* @link http://php.net/sprintf
*/
function __construct() {
$args = func_get_args();
$this->message = call_user_func_array('sprintf', $args);
}
}
/**
* Exception, thrown when a required file does not exist.
*
* @package WebBasics
*/
class FileNotFoundError extends \RuntimeException {
class FileNotFoundError extends \Exception {
/**
* Create a new FileNotFoundError instance.
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment