Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 private void CheckDatabase()
 {
     lblDbConnection.Text = CurrentInstallationManager.CheckDatabase();
 }