![JAR search and dependency download from the Maven repository](/logo.png)
fr.whimtrip.ext.jwhtscrapper.exception.WarningSignException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whimtrip-ext-scrapper Show documentation
Show all versions of whimtrip-ext-scrapper Show documentation
Fully featured highly pluggable and customizable Java scrapping framework
The newest version!
/*
* This code is licensed to WhimTrip©. For any question, please contact the author of the file.
*/
/*
* This code is licensed to WhimTrip©. For any question, please contact the author of the file.
*/
package fr.whimtrip.ext.jwhtscrapper.exception;
import fr.whimtrip.ext.jwhtscrapper.annotation.WarningSign;
import fr.whimtrip.ext.jwhtscrapper.enm.Action;
import fr.whimtrip.ext.jwhtscrapper.enm.PausingBehavior;
import java.lang.reflect.Field;
/**
* Part of project jwht-scrapper
* Created on 26/07/18
*
*
* Triggered when a warning sign is detected.
*
*
* @author Louis-wht
* @since 1.0.0
*/
public class WarningSignException extends RequestFailedException {
private final Field field;
protected Action action;
protected PausingBehavior pausingBehavior;
public WarningSignException(Field field) {
super("Warning sign triggered while setting the value to the field " + field);
WarningSign ws = field.getAnnotation(WarningSign.class);
action = ws.action();
pausingBehavior = ws.pausingBehavior();
this.field = field;
}
public Action getAction() {
return action;
}
public PausingBehavior getPausingBehavior() {
return pausingBehavior;
}
public Field getField() {
return field;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy