Number of cycles
@@ -15,7 +15,6 @@User Bench
email: @userBench?.SamAccountName
-@DetailsMessage
-@HelpMessage
-} -else -{ -@Exception.Message
-@Exception.InnerException?.Message
-@Exception.HelpLink
-} + @if (Exception is null) + { +@DetailsMessage
+@HelpMessage
+ } + else + { +@Exception.Message
+@Exception.InnerException?.Message
+@Exception.HelpLink
+ } + +@Loc["Please report to"] your system administrator
+ + +@Loc["Please report to"] your system administrator
@code { - public static string? ErrorMessage {get;set;} - public static string? DetailsMessage {get;set;} - public static string? HelpMessage {get;set;} - public static Exception Exception{ get; set; } + public static string? ErrorMessage { get; set; } + public static string? DetailsMessage { get; set; } + public static string? HelpMessage { get; set; } + public static Exception Exception { get; set; } + protected override void OnInitialized() + { + base.OnInitialized(); + if (AppDatabaseFactory.DatabaseCreationFailureReason != null) + { + Exception = AppDatabaseFactory.DatabaseCreationFailureReason; + } + } } diff --git a/BLAZAM/Pages/Error/UnhandledExceptionPage.razor b/BLAZAM/Pages/Error/UnhandledExceptionPage.razor index f6b9ea51..e268de5e 100644 --- a/BLAZAM/Pages/Error/UnhandledExceptionPage.razor +++ b/BLAZAM/Pages/Error/UnhandledExceptionPage.razor @@ -1,5 +1,7 @@ +@using BLAZAM.Email.Services; @inject EmailService email -@inject AppDatabaseFactory factory +@inject ApplicationInfo ApplicationInfo +@inject IAppDatabaseFactory factory @inject NavigationManager Nav