| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* This file is part of the Nette Framework (https://nette.org) |
| 5 |
* Copyright (c) 2004 David Grudl (https://davidgrudl.com) |
| 6 |
*/ |
| 7 |
declare (strict_types=1); |
| 8 |
namespace Packetery\Nette\Utils; |
| 9 |
|
| 10 |
/** |
| 11 |
* The exception that is thrown when an image error occurs. |
| 12 |
*/ |
| 13 |
class ImageException extends \Exception |
| 14 |
{ |
| 15 |
} |
| 16 |
/** |
| 17 |
* The exception that indicates invalid image file. |
| 18 |
*/ |
| 19 |
class UnknownImageFileException extends ImageException |
| 20 |
{ |
| 21 |
} |
| 22 |
/** |
| 23 |
* The exception that indicates error of JSON encoding/decoding. |
| 24 |
*/ |
| 25 |
class JsonException extends \Exception |
| 26 |
{ |
| 27 |
} |
| 28 |
/** |
| 29 |
* The exception that indicates error of the last Regexp execution. |
| 30 |
*/ |
| 31 |
class RegexpException extends \Exception |
| 32 |
{ |
| 33 |
public const MESSAGES = [\PREG_INTERNAL_ERROR => 'Internal error', \PREG_BACKTRACK_LIMIT_ERROR => 'Backtrack limit was exhausted', \PREG_RECURSION_LIMIT_ERROR => 'Recursion limit was exhausted', \PREG_BAD_UTF8_ERROR => 'Malformed UTF-8 data', \PREG_BAD_UTF8_OFFSET_ERROR => 'Offset didn\'t correspond to the begin of a valid UTF-8 code point', 6 => 'Failed due to limited JIT stack space']; |
| 34 |
} |
| 35 |
/** |
| 36 |
* The exception that indicates assertion error. |
| 37 |
*/ |
| 38 |
class AssertionException extends \Exception |
| 39 |
{ |
| 40 |
} |
| 41 |
|