# HG changeset patch # User Sebastien Jodogne # Date 1582715729 -3600 # Node ID 356ebef2cd955bd4c9835c00537ec70ca1cb0618 # Parent 5331918773e7f33750c2483c685f32f33f02852d prevent crash on full disk diff -r 5331918773e7 -r 356ebef2cd95 OrthancServer/ServerIndex.cpp --- a/OrthancServer/ServerIndex.cpp Wed Feb 26 11:57:59 2020 +0100 +++ b/OrthancServer/ServerIndex.cpp Wed Feb 26 12:15:29 2020 +0100 @@ -500,7 +500,16 @@ Logging::Flush(); boost::mutex::scoped_lock lock(that->mutex_); - that->db_.FlushToDisk(); + + try + { + that->db_.FlushToDisk(); + } + catch (OrthancException&) + { + LOG(ERROR) << "Cannot flush the SQLite database to the disk (is disk full?)"; + } + count = 0; }