public void close() {
        destroyEach(downloader);
        destroyEach(pageProcessor);
        destroyEach(scheduler);
        for (Pipeline pipeline : pipelines) {
            destroyEach(pipeline);
        }
        threadPool.shutdown();
    }
@deprecated Use {@link #onError(Request, Exception)} instead.
webmagic-core/src/main/java/us/codecraft/webmagic/Spider.java