Created
June 8, 2016 20:24
-
-
Save Mulkave/6134d6053aba0611e197951e8195f61a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Directory\Foundation; | |
use Exception; | |
use Illuminate\Validation\Validator as IlluminateValidator; | |
class InvalidInputException extends Exception | |
{ | |
public function __construct($message = “”, $code = 0, Exception $previous = null) | |
{ | |
if ($message instanceof IlluminateValidator) { | |
$message = $message->messages()->all(); | |
} | |
if (is_array($message)) { | |
$message = implode(“\n”, $message); | |
} | |
parent::__construct($message, $code, $previous); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment