comparison OrthancServer/main.cpp @ 1869:9af3b492b010

invitation to replicate if upgrade fails
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 05 Dec 2015 11:22:17 +0100
parents 579bf74f7da1
children 09a737a6bf36
comparison
equal deleted inserted replaced
1868:c8877965d67d 1869:9af3b492b010
833 return false; 833 return false;
834 } 834 }
835 835
836 LOG(WARNING) << "Upgrading the database from schema version " 836 LOG(WARNING) << "Upgrading the database from schema version "
837 << currentVersion << " to " << ORTHANC_DATABASE_VERSION; 837 << currentVersion << " to " << ORTHANC_DATABASE_VERSION;
838 database.Upgrade(ORTHANC_DATABASE_VERSION, storageArea); 838
839 try
840 {
841 database.Upgrade(ORTHANC_DATABASE_VERSION, storageArea);
842 }
843 catch (OrthancException&)
844 {
845 LOG(ERROR) << "Unable to run the automated upgrade, please use the replication instructions: "
846 << "https://orthanc.chu.ulg.ac.be/book/users/replication.html";
847 throw;
848 }
839 849
840 // Sanity check 850 // Sanity check
841 currentVersion = database.GetDatabaseVersion(); 851 currentVersion = database.GetDatabaseVersion();
842 if (ORTHANC_DATABASE_VERSION != currentVersion) 852 if (ORTHANC_DATABASE_VERSION != currentVersion)
843 { 853 {