mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Updated error msg when database cannot be written on disk (write permission issue)
This commit is contained in:
@@ -47,6 +47,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
/* Create tasks */
|
/* Create tasks */
|
||||||
QApplication * app = new QApplication(argc, argv);
|
QApplication * app = new QApplication(argc, argv);
|
||||||
|
app->setStyleSheet("QMessageBox { messagebox-text-interaction-flags: 5; }"); // selectable message box
|
||||||
|
|
||||||
ParametersMap parameters = Parameters::parseArguments(argc, argv, true);
|
ParametersMap parameters = Parameters::parseArguments(argc, argv, true);
|
||||||
MainWindow * mainWindow = new MainWindow();
|
MainWindow * mainWindow = new MainWindow();
|
||||||
|
|||||||
@@ -345,7 +345,8 @@ bool DBDriverSqlite3::connectDatabaseQuery(const std::string & url, bool overwri
|
|||||||
}
|
}
|
||||||
if(rc != SQLITE_OK)
|
if(rc != SQLITE_OK)
|
||||||
{
|
{
|
||||||
UFATAL("DB error : %s (path=\"%s\")", sqlite3_errmsg(_ppDb), url.c_str());
|
UFATAL("DB error : %s (path=\"%s\"). Make sure that your user has write "
|
||||||
|
"permission on the target directory (you may have to change the working directory). ", sqlite3_errmsg(_ppDb), url.c_str());
|
||||||
_ppDb = 0;
|
_ppDb = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -434,7 +435,8 @@ void DBDriverSqlite3::disconnectDatabaseQuery(bool save, const std::string & out
|
|||||||
{
|
{
|
||||||
UINFO("Saving database to %s ...", outputFile.c_str());
|
UINFO("Saving database to %s ...", outputFile.c_str());
|
||||||
rc = loadOrSaveDb(_ppDb, outputFile, 1); // Save memory to file
|
rc = loadOrSaveDb(_ppDb, outputFile, 1); // Save memory to file
|
||||||
UASSERT_MSG(rc == SQLITE_OK, uFormat("DB error (%s): %s", _version.c_str(), sqlite3_errmsg(_ppDb)).c_str());
|
UASSERT_MSG(rc == SQLITE_OK, uFormat("DB error (%s), could not save \"%s\": %s. Make sure that your user has write "
|
||||||
|
"permission on the target directory (you may have to change the working directory). ", _version.c_str(), outputFile.c_str(), sqlite3_errmsg(_ppDb)).c_str());
|
||||||
ULOGGER_DEBUG("Saving DB time = %fs", timer.ticks());
|
ULOGGER_DEBUG("Saving DB time = %fs", timer.ticks());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user