Package com.io7m.cedarbridge.errors

# Class CBExceptionTracker<T extends Exception>

java.lang.Object
com.io7m.cedarbridge.errors.CBExceptionTracker<T>

Type Parameters:
  `T` - The type of exceptions raised

public final class CBExceptionTracker<T extends Exception> extends Object
A class that tracks exceptions.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CBExceptionTracker()`
  A class that tracks exceptions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addException(T nextException)`
  Add an exception to the tracker.
  `void`
  `throwIfNecessary()`
  Throw an exception of `addException(Exception)` has been called at least once.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CBExceptionTracker

    public CBExceptionTracker()
    A class that tracks exceptions.

- ## Method Details

  - ### addException

    public void addException(T nextException)
    Add an exception to the tracker.
    Parameters:
      `nextException` - The exception

  - ### throwIfNecessary

    public void throwIfNecessary() throws T
    Throw an exception of `addException(Exception)` has been called at least once.
    Throws:
      `T` - If required