From 165463b66c645984c1f7a37891b1a9d651a05fa7 Mon Sep 17 00:00:00 2001 From: Lucas Schatz Date: Thu, 16 Jun 2022 23:19:39 -0300 Subject: [PATCH] Show error msg when save SQL file failed refs #259 --- src/gui/ExecuteSqlFrame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/ExecuteSqlFrame.cpp b/src/gui/ExecuteSqlFrame.cpp index 0d5ec8bf..e812201f 100644 --- a/src/gui/ExecuteSqlFrame.cpp +++ b/src/gui/ExecuteSqlFrame.cpp @@ -1370,6 +1370,10 @@ void ExecuteSqlFrame::OnMenuSaveOrSaveAs(wxCommandEvent& event) updateFrameTitleM = true; statusbar_1->SetStatusText((_("File saved")), 2); } + else + { + throw FRError(wxString::Format(_("Error saving the file, attention for not losing your SQL\nError code: %d"), GetLastError())); + } } void ExecuteSqlFrame::OnMenuClose(wxCommandEvent& WXUNUSED(event))