Package jenkins.util.io
Class CompositeIOException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
jenkins.util.io.CompositeIOException
- All Implemented Interfaces:
Serializable
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class CompositeIOException
extends IOException
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum number of exceptions that can be reported by a singleCompositeIOException
. -
Constructor Summary
ConstructorDescriptionCompositeIOException
(String message, IOException... exceptions) CompositeIOException
(String message, List<IOException> exceptions) Construct a newCompositeIOException
where the given list of exceptions are added as suppressed exceptions to the new exception. -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
EXCEPTION_LIMIT
public static final int EXCEPTION_LIMITThe maximum number of exceptions that can be reported by a singleCompositeIOException
.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 aCompositeIOException
that contains an exception for every single file inside of the directory.- See Also:
-
-
Constructor Details
-
CompositeIOException
Construct a newCompositeIOException
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
- See Also:
-
-
Method Details
-
getExceptions
-
asUncheckedIOException
-