From 840745757673612e8b18fb711412c565f4049ef8 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 8 Sep 2014 17:52:54 +0000 Subject: [PATCH] Runs halfway on Mono. Added some debug code. --- Site5/Pages/v5/Init/Default.aspx.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Site5/Pages/v5/Init/Default.aspx.cs b/Site5/Pages/v5/Init/Default.aspx.cs index a2d57313..72531d44 100644 --- a/Site5/Pages/v5/Init/Default.aspx.cs +++ b/Site5/Pages/v5/Init/Default.aspx.cs @@ -370,6 +370,9 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page _initMessage = "Loading schema from Swarmops servers; creating tables and procs..."; Thread.Sleep(100); + try + { + // Get the schema and initialize the database structures. Requires ADMIN access to database. Swarmops.Logic.Support.DatabaseMaintenance.FirstInitialization(); @@ -604,6 +607,14 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page _initProgress = 100; _initMessage = "Complete."; + } + catch (Exception failedException) + { + // Use initMessage to push info about what went wrong to the user + + _initMessage = failedException.ToString(); + } + Thread.Sleep(1000); // give some time for static var to stick and web interface to react before killing thread }