This commit is contained in:
xiaojunnuo
2024-11-01 02:13:34 +08:00
parent 5160b9fbd6
commit dc9040a68e
25 changed files with 65 additions and 279 deletions

View File

@@ -4,7 +4,7 @@ import { FileStore } from "../core/file-store.js";
import { Logger } from "log4js";
import { IAccessService } from "../access/index.js";
import { ICnameProxyService, IEmailService } from "../service/index.js";
import { IContext, PluginRequestHandleReq, RunnableCollection } from "../core/index.js";
import { CancelError, IContext, PluginRequestHandleReq, RunnableCollection } from "../core/index.js";
import { ILogger, logger, utils } from "../utils/index.js";
import { HttpClient } from "../utils/index.js";
import dayjs from "dayjs";
@@ -113,7 +113,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
checkSignal() {
if (this.ctx.signal && this.ctx.signal.aborted) {
throw new Error("用户取消");
throw new CancelError("用户取消");
}
}