Class BasicException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.juneau.BasicException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanRecursionException

public abstract class BasicException extends Exception
Subclass of non-runtime exceptions that take in a message and zero or more arguments.
See Also:
  • Constructor Details

  • Method Details

    • getCause

      public <T extends Throwable> T getCause(Class<T> c)
      Same as Throwable.getCause() but searches the throwable chain for an exception of the specified type.
      Type Parameters:
      T - The throwable type to search for.
      Parameters:
      c - The throwable type to search for.
      Returns:
      The exception, or null if not found.
    • unwrap

      public Throwable unwrap()
      Returns the caused-by exception if there is one.
      Returns:
      The caused-by exception if there is one, or this exception if there isn't.