![JAR search and dependency download from the Maven repository](/logo.png)
fr.whimtrip.ext.jwhtscrapper.exception.ScrapNotFinishedException 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!
package fr.whimtrip.ext.jwhtscrapper.exception;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
/**
* Part of project jwht-scrapper
* Created on 26/07/18
*
*
* Thrown when the scrapping process of a Scrapping client
* is not finished and a scrap-finished-only method is called
* on this same client.
*
*
* @author Louis-wht
* @since 1.0.0
*/
public class ScrapNotFinishedException extends ScrapperException {
public ScrapNotFinishedException(String scrapperThreadName) {
super(
"Scrapper " + scrapperThreadName + " has not yet finished running. To abort its" +
" process manually, please use AutomaticScrapperClient.terminate() method or use" +
" a timeout in the AutomaticScrapperClient.getResults(Long Timeout, TimeUnit timeUnit)" +
" method"
);
}
public ScrapNotFinishedException(TimeoutException e, String scrapperThreadName) {
super(
"Scrapper " + scrapperThreadName + " has not yet finished running. The" +
" process was aborted by the " + ExecutionException.class + " triggered" +
" because of the timeout provided."
);
initCause(e);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy