From 390726d14797701ae546231d6a28ffae2afe5ec9 Mon Sep 17 00:00:00 2001 From: unitwk Date: Sun, 18 Sep 2022 19:34:04 +0800 Subject: [PATCH] Feat: optimize throw error --- src/entity/commands/start.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/commands/start.ts b/src/entity/commands/start.ts index 371fba3..6638d33 100755 --- a/src/entity/commands/start.ts +++ b/src/entity/commands/start.ts @@ -42,7 +42,7 @@ export default class StartCommand extends InstanceCommand { if (endTime) { const currentTime = new Date().getTime(); if (endTime <= currentTime) { - return instance.failure(new Error($t("start.instanceMaturity"))); + throw new Error($t("start.instanceMaturity")); } }