private void TryHandleWrongClassException(Exception ex) { if (ex == null) { return; } if (ex is WrongClassException) { var wex = ex as WrongClassException; RedirectToFix(wex); return; } if (ex is LazyInitializationException) { try { installer.CheckDatabase(); } catch (WrongClassException wex) { RedirectToFix(wex); } catch { } return; } // recusively check inner exception to handle exceptions within child requests TryHandleWrongClassException(ex.InnerException); }
private void CheckDatabase() { lblDbConnection.Text = CurrentInstallationManager.CheckDatabase(); }