From b9e04c86f2c079d48bd094a8c9dca19f569174e1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 12 Jan 2024 09:16:57 +0100 Subject: [PATCH] feat: improved error message for to long models --- WebSocketClient/src/ImportExportFiles.ts | 2 +- WebSocketClient/src/main.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WebSocketClient/src/ImportExportFiles.ts b/WebSocketClient/src/ImportExportFiles.ts index b5f4e28..590f28f 100644 --- a/WebSocketClient/src/ImportExportFiles.ts +++ b/WebSocketClient/src/ImportExportFiles.ts @@ -41,7 +41,7 @@ export function uploadFile(): Promise { stringPromise.then((res) => { const lineCount = res.split('\n').length; if(lineCount > config.MAX_NUMBER_LINES){ - displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_LINES} Lines!`); + displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_LINES} Lines! (Because of performance reasons)`); resolve(res.split('\n').slice(0, config.MAX_NUMBER_LINES - 1).reduce((acc, curr) => acc + curr + "\n", "")); }else{ resolve(res); diff --git a/WebSocketClient/src/main.ts b/WebSocketClient/src/main.ts index 3655005..b5f5b4c 100644 --- a/WebSocketClient/src/main.ts +++ b/WebSocketClient/src/main.ts @@ -291,14 +291,14 @@ export const startUvlClient = async () => { } else { vscode.commands.executeCommand("deleteLeft"); } - displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_LINES} Lines!`); + displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_LINES} Lines! (Because of performance reasons)`); } else if (numberCharacters > config.MAX_NUMBER_CHARACTERS) { if (numberCharacters > config.MAX_NUMBER_CHARACTERS + 1) { vscode.commands.executeCommand("undo"); } else { vscode.commands.executeCommand("deleteLeft"); } - displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_CHARACTERS} Characters!`); + displayEditorErrorAtContent(`The Editor only allows content up to ${config.MAX_NUMBER_CHARACTERS} Characters! (Because of performance reasons)`); } debouncedSave(); if (updateGraph && debounceGenGraph !== undefined) {