From 105ea19eae857afdf3d7712556c70dfa7ab160c7 Mon Sep 17 00:00:00 2001 From: phyzical Date: Fri, 4 Feb 2022 17:46:08 +0800 Subject: [PATCH] add the industry name to assist with debugging when error occurs --- src/Corporation/Actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Corporation/Actions.ts b/src/Corporation/Actions.ts index 9a510e67d..7a24ab591 100644 --- a/src/Corporation/Actions.ts +++ b/src/Corporation/Actions.ts @@ -17,7 +17,7 @@ import { ResearchMap } from "./ResearchMap"; export function NewIndustry(corporation: ICorporation, industry: string, name: string): void { if (corporation.divisions.find(({ type }) => industry == type)) - throw new Error("You have already expanded into this industry!"); + throw new Error(`You have already expanded into the ${industry} industry!`); for (let i = 0; i < corporation.divisions.length; ++i) { if (corporation.divisions[i].name === name) {