diff options
author | Grant Limberg <glimberg@gmail.com> | 2015-07-29 20:13:32 -0700 |
---|---|---|
committer | Grant Limberg <glimberg@gmail.com> | 2015-07-29 20:13:32 -0700 |
commit | c9b4028cd32e940a3ccd1c44cb6ebcf850e145d0 (patch) | |
tree | 4de4a9ce943509d77bc56692335cacc5eb684fa1 /controller/SqliteNetworkController.cpp | |
parent | 508d31513a0848236258542930cf577d95afda99 (diff) | |
parent | 7cd3c419ee720adb5acc9d754773d52ad5ceafab (diff) | |
download | infinitytier-c9b4028cd32e940a3ccd1c44cb6ebcf850e145d0.tar.gz infinitytier-c9b4028cd32e940a3ccd1c44cb6ebcf850e145d0.zip |
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'controller/SqliteNetworkController.cpp')
-rw-r--r-- | controller/SqliteNetworkController.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 50be5b34..c95d3b74 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -146,9 +146,10 @@ SqliteNetworkController::SqliteNetworkController(const char *dbPath) : // Prepare statement will fail if Config table doesn't exist, which means our DB // needs to be initialized. if (sqlite3_exec(_db,ZT_NETCONF_SCHEMA_SQL"INSERT INTO Config (k,v) VALUES ('schemaVersion',"ZT_NETCONF_SQLITE_SCHEMA_VERSION_STR");",0,0,0) != SQLITE_OK) { - //printf("%s\n",sqlite3_errmsg(_db)); + char err[1024]; + Utils::snprintf(err,sizeof(err),"SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table: %s",sqlite3_errmsg(_db)); sqlite3_close(_db); - throw std::runtime_error("SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table"); + throw std::runtime_error(err); } } |