org.apache.commons.nabla.algorithmic.forward.analysis
Class ErrorReporter

java.lang.Object
  extended by org.apache.commons.nabla.algorithmic.forward.analysis.ErrorReporter

public class ErrorReporter
extends Object

Class used for delayed error reporting.


Constructor Summary
ErrorReporter()
           
 
Method Summary
 boolean hasError()
          Check if an error has already been registered.
 void register(DifferentiationException exception)
          Register an exception to be reported later.
 void reportErrors()
          Report the error if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorReporter

public ErrorReporter()
Method Detail

register

public void register(DifferentiationException exception)
Register an exception to be reported later.

Parameters:
exception - exception to be reported

hasError

public boolean hasError()
Check if an error has already been registered.

Returns:
true if an error has already been registered

reportErrors

public void reportErrors()
                  throws DifferentiationException
Report the error if any.

If not error has been reported (i.e. if hasError() returns false), this method does nothing. Otherwise, it rethrows the original exception.

Throws:
DifferentiationException - if some error occurred during differentiation


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.