static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { int exceptionid = NextExceptionID; Basic.ErrorFormat("Unhandled exception occured. Error Number: {0}", exceptionid); Detail.Error(string.Format("Error Number: {0}", exceptionid), e.ExceptionObject as Exception); }
public static void UnExpectedError(Exception exc, string message = "") { if (message == string.Empty) { message = "Unexpected exception occured."; } int exceptionid = NextExceptionID; Basic.ErrorFormat("{0} Error Number: {1}", message, exceptionid); Detail.Error(string.Format("Error Number: {0}", exceptionid), exc); }