All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.yandex.qatools.fsm.annotations.OnException Maven / Gradle / Ivy

There is a newer version: 1.11
Show newest version
package ru.yandex.qatools.fsm.annotations;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;

/**
 * Marks method as exception handler like shown below:
 * 
 * 
 * {@literal @}@OnException(preserve = true)
 * public void onArithmeticException(SomeException e, FromState fromState, EndState endState, Event event) {
 *     System.out.println("An exception occurred: " + e.getMessage());
 * }
 * 
 * 
* @author Ilya Sadykov */ @Retention(RetentionPolicy.RUNTIME) @Target({METHOD}) public @interface OnException { /** * Whether to continue transition after handling exception * * @return true to continue transition */ boolean preserve() default false; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy