public function throw_exception($e=null)
    {
        $e = $e ?: new \Exception();

        foreach ($this->policies as $policy) {
            $policy->check_method_throws($this->className, $this->methodName, $e, true);
        }

        $this->will(function () use ($e) {
            throw $e;
        });

        return $this;
    }
public function throw_exception($e=null)
    {
        $e = $e ?: new \Exception();

        foreach ($this->policies as $policy) {
            $policy->check_method_throws($this->className, $this->methodName, $e, true);
        }

        $this->will(function () use ($e) {
            throw $e;
        });

        return $this;
    }
public function throw_exception ( $ e = null ) { $ e = $ e ? : new \ Exception ( ) ; foreach ( $ this -> policies as $ policy ) { $ policy -> check_method_throws ( $ this -> className , $ this -> methodName , $ e , true ) ; } $ this -> will ( function ( ) use ( $ e ) { throw $ e ; } ) ; return $ this ; }
Throws an exception on invocation.
@param \Exception|void $e the exception to throw. If not specified, Shmock will provide an instance of
the base \Exception.
@return \Shmock\Spec
Throws an exception on invocation .