private void checkRunningStat() {
        while (true) {
            int statNow = stat.get();
            if (statNow == STAT_RUNNING) {
                throw new IllegalStateException("Spider is already running!");
            }
            if (stat.compareAndSet(statNow, STAT_RUNNING)) {
                break;
            }
        }
    }
@deprecated Use {@link #onError(Request, Exception)} instead.
webmagic-core/src/main/java/us/codecraft/webmagic/Spider.java