changeset 3699:efa815dd2c20

additional logging
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Feb 2020 12:19:34 +0100
parents 356ebef2cd95
children 5cbbf14e516b
files Core/SQLite/StatementReference.cpp OrthancServer/ServerIndex.cpp
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/SQLite/StatementReference.cpp	Wed Feb 26 12:15:29 2020 +0100
+++ b/Core/SQLite/StatementReference.cpp	Wed Feb 26 12:19:34 2020 +0100
@@ -82,8 +82,12 @@
       if (error != SQLITE_OK)
       {
 #if ORTHANC_SQLITE_STANDALONE != 1
-        LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database)
-                   << " (" << sqlite3_extended_errcode(database) << ")";
+        int extended = sqlite3_extended_errcode(database);
+        LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database) << " (" << extended << ")";
+        if (extended == SQLITE_IOERR_SHMSIZE  /* 4874 */)
+        {
+          LOG(ERROR) << "  This probably indicates that your filesystem is full";
+        }        
 #endif
 
         throw OrthancSQLiteException(ErrorCode_SQLitePrepareStatement);
--- a/OrthancServer/ServerIndex.cpp	Wed Feb 26 12:15:29 2020 +0100
+++ b/OrthancServer/ServerIndex.cpp	Wed Feb 26 12:19:34 2020 +0100
@@ -507,7 +507,7 @@
       }
       catch (OrthancException&)
       {
-        LOG(ERROR) << "Cannot flush the SQLite database to the disk (is disk full?)";
+        LOG(ERROR) << "Cannot flush the SQLite database to the disk (is your filesystem full?)";
       }
           
       count = 0;