Class CompositeIOException

All Implemented Interfaces:
Serializable

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class CompositeIOException extends IOException
See Also:
  • Field Details

    • EXCEPTION_LIMIT

      public static final int EXCEPTION_LIMIT
      The maximum number of exceptions that can be reported by a single CompositeIOException.

      The number of exceptions is limited to avoid pathological cases where a huge number of exceptions could lead to excessive memory usage. For example, if the number of exceptions was unlimited, a call to Util.deleteRecursive could fail with a CompositeIOException that contains an exception for every single file inside of the directory.

      See Also:
  • Constructor Details

    • CompositeIOException

      public CompositeIOException(String message, @NonNull List<IOException> exceptions)
      Construct a new CompositeIOException where the given list of exceptions are added as suppressed exceptions to the new exception.

      If the given list of exceptions is longer than EXCEPTION_LIMIT, the list will be truncated to that length, and a message indicating the number of discarded exceptions will be appended to the original message.

    • CompositeIOException

      public CompositeIOException(String message, IOException... exceptions)
      See Also:
  • Method Details