11
0
Fork 0
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:
Alannah Kearney 2019-05-25 11:57:32 +10:00
commit 50e56a8649

View 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);
}
}