From db8b897211d83a5ec0c87477c01b41a6fa24a93b Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 7 Nov 2013 17:10:36 -0800 Subject: [PATCH] better exception messages when the site fails to start --- src/KeyHub.Core/Kernel/KernelContext.cs | 4 ++-- src/KeyHub.Core/Kernel/KernelEventIncompleteException.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/KeyHub.Core/Kernel/KernelContext.cs b/src/KeyHub.Core/Kernel/KernelContext.cs index 4efd852..69b6f28 100644 --- a/src/KeyHub.Core/Kernel/KernelContext.cs +++ b/src/KeyHub.Core/Kernel/KernelContext.cs @@ -75,13 +75,13 @@ private void RunKernelEvents(IEnumerable kernelList) var bootIssue = new GenericError { ErrorException = kernelEventException, - ErrorMessage = "", + ErrorMessage = kernelEventException.ToString(), Severity = ErrorSeverity.Critical }; loggingService.Fatal(bootIssue); - throw new KernelEventIncompleteException(); + throw new KernelEventIncompleteException(kernelEventException); } // Check if the kernel event returned a value diff --git a/src/KeyHub.Core/Kernel/KernelEventIncompleteException.cs b/src/KeyHub.Core/Kernel/KernelEventIncompleteException.cs index 54b4509..bd06fd3 100644 --- a/src/KeyHub.Core/Kernel/KernelEventIncompleteException.cs +++ b/src/KeyHub.Core/Kernel/KernelEventIncompleteException.cs @@ -10,5 +10,9 @@ public class KernelEventIncompleteException : Exception { public KernelEventIncompleteException() : base("Some of the kernel events have failed! Check the log file for any specifics.") { } + + public KernelEventIncompleteException(Exception inner) + : base("Some of the kernel events have failed! Check the log file for any specifics.", inner) { } + } } \ No newline at end of file