Class ConnectorException

    • Constructor Summary

      Constructors 
      Constructor Description
      ConnectorException()  
      ConnectorException​(java.lang.String message)
      Sets a message for the Exception.
      ConnectorException​(java.lang.String message, java.lang.Throwable originalException)
      Sets the stack trace to the original exception, so this exception can masquerade as the original only be a RuntimeException.
      ConnectorException​(java.lang.Throwable originalException)
      Sets the stack trace to the original exception, so this exception can masquerade as the original only be a RuntimeException.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void rethrow()
      Re-throw the original exception.
      static java.lang.RuntimeException wrap​(java.lang.Throwable ex)
      If Exception parameter passed in is a RuntimeException it is simply returned.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConnectorException

        public ConnectorException()
      • ConnectorException

        public ConnectorException​(java.lang.String message)
        Sets a message for the Exception.
        Parameters:
        message - passed to the RuntimeException message.
      • ConnectorException

        public ConnectorException​(java.lang.Throwable originalException)
        Sets the stack trace to the original exception, so this exception can masquerade as the original only be a RuntimeException.
        Parameters:
        originalException - the original exception adapted to RuntimeException.
      • ConnectorException

        public ConnectorException​(java.lang.String message,
                                  java.lang.Throwable originalException)
        Sets the stack trace to the original exception, so this exception can masquerade as the original only be a RuntimeException.
        Parameters:
        message - the message
        originalException - the original exception adapted to RuntimeException.
    • Method Detail

      • rethrow

        public void rethrow()
                     throws java.lang.Throwable
        Re-throw the original exception.
        Throws:
        java.lang.Exception - throws the original passed in the constructor.
        java.lang.Throwable
      • wrap

        public static java.lang.RuntimeException wrap​(java.lang.Throwable ex)
        If Exception parameter passed in is a RuntimeException it is simply returned. Otherwise the Exception is wrapped in a ConnectorException and returned.
        Parameters:
        ex - Exception to wrap or cast and return.
        Returns:
        a RuntimeException that either is the specified exception or contains the specified exception.