changeset 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 c8877965d67d
children a6c431193c79
files OrthancServer/main.cpp
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
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();