mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-18 19:48:23 -05:00
Better error messages
Show better error message in some cirsumstances. This is most notable when dropping a (database) file onto the structure tree view when no database file is opened.
This commit is contained in:
@@ -685,7 +685,10 @@ bool DBBrowserDB::dump(const QString& filename,
|
||||
bool DBBrowserDB::executeSQL(QString statement, bool dirtyDB, bool logsql)
|
||||
{
|
||||
if (!isOpen())
|
||||
{
|
||||
lastErrorMessage = tr("No database file opened");
|
||||
return false;
|
||||
}
|
||||
|
||||
statement = statement.trimmed();
|
||||
|
||||
@@ -715,7 +718,10 @@ bool DBBrowserDB::executeMultiSQL(const QString& statement, bool dirty, bool log
|
||||
{
|
||||
// First check if a DB is opened
|
||||
if(!isOpen())
|
||||
{
|
||||
lastErrorMessage = tr("No database file opened");
|
||||
return false;
|
||||
}
|
||||
|
||||
QString query = statement.trimmed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user