Class UnwrappableRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.clumd.projects.java_common_utils.base_enhancements.UnwrappableRuntimeException
All Implemented Interfaces:
UnwrappableThrowable, Serializable

public abstract class UnwrappableRuntimeException extends RuntimeException implements UnwrappableThrowable
See Also:
  • Field Details

  • Constructor Details

    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(String reason)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Iterable<String> reasons)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(String reason, Throwable cause)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Iterable<String> reasons, Throwable cause)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Supplier<String> reason)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Supplier<String> reason, Throwable cause)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(String reason, Object... metadata)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Iterable<String> reasons, Object... metadata)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(String reason, Throwable cause, Object... metadata)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Iterable<String> reasons, Throwable cause, Object... metadata)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Supplier<String> reason, Object... metadata)
    • UnwrappableRuntimeException

      protected UnwrappableRuntimeException(Supplier<String> reason, Throwable cause, Object... metadata)
  • Method Details

    • unwrapReasonsIntoList

      public List<String> unwrapReasonsIntoList(boolean includeTrace)
      Description copied from interface: UnwrappableThrowable
      The implementation of this method should provide a list, where each element in the list represents one Exception in the tree of causes. A caller may also use the parameter to ask for the causes to include their respective stack traces. This may either be in-line to one string in the list, or it may explode them out into their own distinct entries.
      Specified by:
      unwrapReasonsIntoList in interface UnwrappableThrowable
      Parameters:
      includeTrace - Used to determine whether we should include the stack trace in the messages or not.
      Returns:
      A collection of Strings, where each element represents one Exception in the tree of causes, which may contain the stack traces that each exception originated from.