From 14da4290639763ed79249c90f95e2387025a4764 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 30 May 2022 18:27:45 +0300 Subject: Autocommit at 30.05.2022 @ 18:27 --- src/UserInterface/UserInterface.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/UserInterface/UserInterface.cpp') diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index 4520d61..3fd51a7 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -9,6 +9,17 @@ Table* UserInterface::table = nullptr; void UserInterface::com_open(const char* params) { + if (table != nullptr) { + printLine("A file has already been opened!"); + return; + } + + try { + table = new Table(params); + } + catch (std::logic_error err) { + printLine(err.what()); + } } void UserInterface::com_close(const char* params) { } -- cgit v1.3.1-23-gd82d