src/Attributes/BaseAttribute.php
public function newException(string $code, $value): Exception
    {
        $exception = $this->getException($code);

        return new $exception(
            strtoupper(Str::kebab($this->getManager()->getName())),
            strtoupper(Str::kebab($this->getName())),
            $value
        );
    }
public function newException(string $code, $value): Exception
    {
        $exception = $this->getException($code);

        return new $exception(
            strtoupper(Str::kebab($this->getManager()->getName())),
            strtoupper(Str::kebab($this->getName())),
            $value
        );
    }
public function newException ( string $ code , $ value ) : Exception { $ exception = $ this -> getException ( $ code ) ; return new $ exception ( strtoupper ( Str :: kebab ( $ this -> getManager ( ) -> getName ( ) ) ) , strtoupper ( Str :: kebab ( $ this -> getName ( ) ) ) , $ value ) ; }
Create a new instance of exception.

@param string $code
@param mixed  $value

@return \Exception
Create a new instance of exception .