| @@ 13-23 (lines=11) @@ | ||
| 10 | ||
| 11 | use Exception; |
|
| 12 | ||
| 13 | class InvalidBinaryAbsolutePathException extends InvalidBinaryFileIdException |
|
| 14 | { |
|
| 15 | public function __construct($id, $code = 0) |
|
| 16 | { |
|
| 17 | $this->setMessageTemplate("Argument 'BinaryFile::id' is invalid: '%id%' is wrong value, binary file ids can not begin with a '/'"); |
|
| 18 | $this->setParameters(['%id%' => $id]); |
|
| 19 | ||
| 20 | // Parent does not let us set specifc message, so we jump all the way up to root Exception __construct(). |
|
| 21 | Exception::__construct($this->getBaseTranslation(), $code); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| @@ 13-23 (lines=11) @@ | ||
| 10 | ||
| 11 | use Exception; |
|
| 12 | ||
| 13 | class InvalidBinaryPrefixException extends InvalidBinaryFileIdException |
|
| 14 | { |
|
| 15 | public function __construct($id, $prefix, $code = 0) |
|
| 16 | { |
|
| 17 | $this->setMessageTemplate("Argument 'BinaryFile::id' is invalid: '%id%' is wrong value, it does not contain prefix '%prefix%'. Is 'var_dir' config correct?"); |
|
| 18 | $this->setParameters(['%id%' => $id, '%prefix%' => $prefix]); |
|
| 19 | ||
| 20 | // Parent does not let us set specifc message, so we jump all the way up to root Exception __construct(). |
|
| 21 | Exception::__construct($this->getBaseTranslation(), $code); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||