org.protelis.test.observer.ExceptionObserver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protelis-test Show documentation
Show all versions of protelis-test Show documentation
Essential libraries for testing Protelis programs and simulations
/*
* Copyright (C) 2021, Danilo Pianini and contributors listed in the project's build.gradle.kts or pom.xml file.
*
* This file is part of Protelis, and is distributed under the terms of the GNU General Public License,
* with a linking exception, as described in the file LICENSE.txt in this project's top directory.
*/
package org.protelis.test.observer;
import java.util.List;
import java.util.Optional;
/**
* This observer intercepts exception thrown during the tests.
*/
public interface ExceptionObserver {
/**
* An exception has been thrown.
*
* @param ex
* exception
* @return the same exception
*/
Exception exceptionThrown(Exception ex);
/**
* @return list of all the thrown exception
*/
List getExceptionList();
/**
* @return last thrown exception
*/
Optional getLastException();
/**
* @return first thrown exception
*/
Optional getFirstException();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy