Package org.protelis.test.observer
Class SimpleExceptionObserver
- java.lang.Object
-
- org.protelis.test.observer.SimpleExceptionObserver
-
- All Implemented Interfaces:
ExceptionObserver
public final class SimpleExceptionObserver extends java.lang.Object implements ExceptionObserver
Simple exception observer.
-
-
Constructor Summary
Constructors Constructor Description SimpleExceptionObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ExceptionexceptionThrown(java.lang.Exception ex)An exception has been thrown.java.util.List<java.lang.Exception>getExceptionList()java.util.Optional<java.lang.Exception>getFirstException()java.util.Optional<java.lang.Exception>getLastException()
-
-
-
Method Detail
-
exceptionThrown
public java.lang.Exception exceptionThrown(java.lang.Exception ex)
Description copied from interface:ExceptionObserverAn exception has been thrown.- Specified by:
exceptionThrownin interfaceExceptionObserver- Parameters:
ex- exception- Returns:
- the same exception
-
getExceptionList
public java.util.List<java.lang.Exception> getExceptionList()
- Specified by:
getExceptionListin interfaceExceptionObserver- Returns:
- list of all the thrown exception
-
getLastException
public java.util.Optional<java.lang.Exception> getLastException()
- Specified by:
getLastExceptionin interfaceExceptionObserver- Returns:
- last thrown exception
-
getFirstException
public java.util.Optional<java.lang.Exception> getFirstException()
- Specified by:
getFirstExceptionin interfaceExceptionObserver- Returns:
- first thrown exception
-
-