mirror of
https://github.com/n3w/helpers-cli-input.git
synced 2025-12-19 12:43:23 +00:00
Added InputValidationFailedException exception
This commit is contained in:
parent
e71ea40616
commit
50e56a8649
1 changed files with 14 additions and 0 deletions
14
src/Input/Exceptions/InputValidationFailedException.php
Normal file
14
src/Input/Exceptions/InputValidationFailedException.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pointybeard\Helpers\Cli\Input\Exceptions;
|
||||
use pointybeard\Helpers\Cli\Input\AbstractInputType;
|
||||
|
||||
class InputValidationFailedException extends \Exception
|
||||
{
|
||||
public function __construct(AbstractInputType $input, $code = 0, \Exception $previous = null)
|
||||
{
|
||||
return parent::__construct(sprintf("Validation failed for %s. Returned: %s", $input->getDisplayName(), $previous->getMessage()), $code, $previous);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue