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.Exception
exceptionThrown(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:ExceptionObserver
An exception has been thrown.- Specified by:
exceptionThrown
in interfaceExceptionObserver
- Parameters:
ex
- exception- Returns:
- the same exception
-
getExceptionList
public java.util.List<java.lang.Exception> getExceptionList()
- Specified by:
getExceptionList
in interfaceExceptionObserver
- Returns:
- list of all the thrown exception
-
getLastException
public java.util.Optional<java.lang.Exception> getLastException()
- Specified by:
getLastException
in interfaceExceptionObserver
- Returns:
- last thrown exception
-
getFirstException
public java.util.Optional<java.lang.Exception> getFirstException()
- Specified by:
getFirstException
in interfaceExceptionObserver
- Returns:
- first thrown exception
-
-