setException() public method

Set updated exception back to event
public setException ( Exception $exception )
$exception Exception
 public function testSetters()
 {
     $event = new ApiExceptionEvent(new Exception());
     $event->setException(new InvalidArgumentException());
     $this->assertInstanceOf(InvalidArgumentException::class, $event->getException());
 }