Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / UserInterface.cpp
diff options
context:
space:
mode:
1 files changed, 11 insertions, 0 deletions
-rw-r--r--src/UserInterface/UserInterface.cpp11
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) {
}