Class ProtonExceptionSupport


  • public class ProtonExceptionSupport
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static EngineFailedException createFailedException​(java.lang.String message, java.lang.Throwable cause)
      Creates a new instance of an EngineFailedException that either wraps the given cause if it is not an instance of an EngineFailedException or creates a new copy of the given EngineFailedException in order to produce a meaningful stack trace for the caller of which of their calls failed due to the engine state being failed.
      static EngineFailedException createFailedException​(java.lang.Throwable cause)
      Checks the given cause to determine if it's already an ProtonException type and if not creates a new ProtonException to wrap it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtonExceptionSupport

        public ProtonExceptionSupport()
    • Method Detail

      • createFailedException

        public static EngineFailedException createFailedException​(java.lang.Throwable cause)
        Checks the given cause to determine if it's already an ProtonException type and if not creates a new ProtonException to wrap it.
        Parameters:
        cause - The initiating exception that should be cast or wrapped.
        Returns:
        an ProtonException instance.
      • createFailedException

        public static EngineFailedException createFailedException​(java.lang.String message,
                                                                  java.lang.Throwable cause)
        Creates a new instance of an EngineFailedException that either wraps the given cause if it is not an instance of an EngineFailedException or creates a new copy of the given EngineFailedException in order to produce a meaningful stack trace for the caller of which of their calls failed due to the engine state being failed.
        Parameters:
        message - A descriptive message to be applied to the returned exception.
        cause - The initiating exception that should be cast or wrapped.
        Returns:
        an ProtonException instance.