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

fr.whimtrip.ext.jwhtscrapper.exception.ScrapNotFinishedException Maven / Gradle / Ivy

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