Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Fri Dec 04 16:18:46 2015 +0100 +++ b/OrthancServer/main.cpp Sat Dec 05 11:22:17 2015 +0100 @@ -835,7 +835,17 @@ LOG(WARNING) << "Upgrading the database from schema version " << currentVersion << " to " << ORTHANC_DATABASE_VERSION; - database.Upgrade(ORTHANC_DATABASE_VERSION, storageArea); + + try + { + database.Upgrade(ORTHANC_DATABASE_VERSION, storageArea); + } + catch (OrthancException&) + { + LOG(ERROR) << "Unable to run the automated upgrade, please use the replication instructions: " + << "https://orthanc.chu.ulg.ac.be/book/users/replication.html"; + throw; + } // Sanity check currentVersion = database.GetDatabaseVersion();