public virtual bool Startup()
{
IHabaneroLogger log = null;
try {
SetupApplicationNameAndVersion();
SetupLogging();
SetupExceptionNotifier();
log = GlobalRegistry.LoggerFactory.GetLogger("HabaneroApp");
LogAppStartingInfo(log);
SetupDatabaseConnection();
SetupSettings();
SetupClassDefs();
Upgrade();
}
catch (Exception ex) {
string errorMessage = "There was a problem starting the application.";
if (log != null)
{
log.Log("---------------------------------------------" +
Environment.NewLine + ExceptionUtilities.GetExceptionString(ex, 0, true), LogCategory.Exception);
errorMessage += " Please look at the log file for details of the problem.";
}
if (GlobalRegistry.UIExceptionNotifier != null)
{
GlobalRegistry.UIExceptionNotifier.Notify(
new UserException(errorMessage, ex),
"Problem in Startup:", "Problem in Startup");
}
return false;
}
return true;
}