Adds functionality to the standard Exception
class.
- Create new exceptions based on
sprintf()
format. - Create new exceptions using the last error (
error_get_last()
).
use Phine\Exception\Exception;
$exception = Exception::createUsingFormat(
'This is my %s message.',
'formatted',
$previousException
);
echo $undefined;
$exception = Exception::createUsingLastError();
- PHP >= 5.3.3
Via Composer:
$ composer require "phine/exception=~1.0"
You can find the documentation in the docs/
directory.
This library is available under the MIT license.