public function throwException($message = null)
    {
        if ($message === null) {
            $message = 'The method [' . $this->name() . '] does not exist.';
        }

        throw new BadMethodCallException($message);
    }
public function throwException($message = null)
    {
        if ($message === null) {
            $message = 'The method [' . $this->name() . '] does not exist.';
        }

        throw new BadMethodCallException($message);
    }
public function throwException ( $ message = null ) { if ( $ message === null ) { $ message = 'The method [' . $ this -> name ( ) . '] does not exist.' ; } throw new BadMethodCallException ( $ message ) ; }
Throw a BadMethodCallException. The default exception message assumes
that the exception is thrown because the method doesn't exist

@param string|null $message The customizable exception message

@return void

@throws BadMethodCallException With the given message or a default
message that assumes that the method doesn't exist
Throw a BadMethodCallException . The default exception message assumes that the exception is thrown because the method doesn t exist