From 192ba8c8058018a4575c60b5289467dd7289e8b9 Mon Sep 17 00:00:00 2001 From: qarlosalberto Date: Sat, 29 Jul 2023 16:29:14 +0200 Subject: [PATCH] feat: add alert when schematic graph exceeds the maximum size --- packages/teroshdl/src/features/schematic.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/teroshdl/src/features/schematic.ts b/packages/teroshdl/src/features/schematic.ts index f5d15607..3367b13c 100644 --- a/packages/teroshdl/src/features/schematic.ts +++ b/packages/teroshdl/src/features/schematic.ts @@ -370,7 +370,13 @@ export class Schematic_manager extends Base_webview { }; let jsonp = output_yosys.result; - output_yosys.result = await netlistsvg.render(skin, jsonp, undefined, undefined, config); + try { + output_yosys.result = await netlistsvg.render(skin, jsonp, undefined, undefined, config); + } catch (error) { + console.log(error); + this.logger.error("Generating the schematic graph. The graph exceeds the maximum size.", true); + return ""; + } return output_yosys; }