comparison OrthancServer/ServerIndex.cpp @ 3698:356ebef2cd95

prevent crash on full disk
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Feb 2020 12:15:29 +0100
parents e5811a9f8df0
children efa815dd2c20
comparison
equal deleted inserted replaced
3697:5331918773e7 3698:356ebef2cd95
498 } 498 }
499 499
500 Logging::Flush(); 500 Logging::Flush();
501 501
502 boost::mutex::scoped_lock lock(that->mutex_); 502 boost::mutex::scoped_lock lock(that->mutex_);
503 that->db_.FlushToDisk(); 503
504 try
505 {
506 that->db_.FlushToDisk();
507 }
508 catch (OrthancException&)
509 {
510 LOG(ERROR) << "Cannot flush the SQLite database to the disk (is disk full?)";
511 }
512
504 count = 0; 513 count = 0;
505 } 514 }
506 515
507 LOG(INFO) << "Stopping the database flushing thread"; 516 LOG(INFO) << "Stopping the database flushing thread";
508 } 517 }