Class ExceptionBuilder<T extends Throwable>

java.lang.Object
org.apache.juneau.internal.ExceptionBuilder<T>
Type Parameters:
T - The exception class.

public class ExceptionBuilder<T extends Throwable> extends Object
Builder class for Exception objects.
See Also:
  • Constructor Details

    • ExceptionBuilder

      public ExceptionBuilder(Class<T> type)
      Default constructor.
      Parameters:
      type - The exception type to create.
  • Method Details

    • message

      public ExceptionBuilder<T> message(String msg, Object... args)
      Specifies the exception message.
      Parameters:
      msg - The exception message. Can be null.
      If null, then the caused-by message is used if available.
      args - The exception message arguments.
      Returns:
      This object.
    • causedBy

      Specifies the caused-by exception.
      Parameters:
      value - The caused-by exception. Can be null.
      Returns:
      This object.
    • build

      public T build()
      Creates the exception.
      Returns:
      The exception.