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 voidadd(java.lang.Throwable e)Log an exception.voidthrowIfRequired()Throw an exception encapsulating all of the previously logged exceptions as suppressed exceptions, if any have been logged.java.lang.StringtoString()
-
Constructor Details
-
WXMExceptions
public WXMExceptions()Construct an empty exception list.
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin 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
-