Package com.io7m.waxmill.exceptions
Class WXMExceptions
java.lang.Object
com.io7m.waxmill.exceptions.WXMExceptions
public final class WXMExceptions
extends java.lang.Object
A class for accumulating exceptions.
-
Constructor Summary
Constructors Constructor Description WXMExceptions()
Construct an empty exception list. -
Method Summary
Modifier and Type Method Description void
add(java.lang.Throwable e)
Log an exception.void
throwIfRequired()
Throw an exception encapsulating all of the previously logged exceptions as suppressed exceptions, if any have been logged.java.lang.String
toString()
-
Constructor Details
-
WXMExceptions
public WXMExceptions()Construct an empty exception list.
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
add
public void add(java.lang.Throwable e)Log an exception.- Parameters:
e
- The exception
-
throwIfRequired
Throw an exception encapsulating all of the previously logged exceptions as suppressed exceptions, if any have been logged. Does nothing itadd(Throwable)
has never been called.- Throws:
WXMException
- If any exceptions have been logged
-