code: public function hasException(\Exception $exception)
      {
          $class = get_class($exception);
          $exceptions = $this->getExceptions();
  
          return isset($exceptions[$class]);
      }
docs: Is has exception in storage
  
  @param \Exception $exception
  
  @return bool