internal static void Error(string message, Exception exception) { Write(message + Environment.NewLine + "Exception: " + exception, LoggerCategory.NBugError); if (Settings.DisplayDeveloperUI) { using (var viewer = new InternalExceptionViewer()) { viewer.ShowDialog(exception); } } if (Settings.ThrowExceptions) { throw new NBugRuntimeException(message, exception); } }
internal static void Error <T>(Expression <Func <T> > propertyExpression, string message) { Write(message + " Misconfigured Property: " + ((MemberExpression)propertyExpression.Body).Member.Name, LoggerCategory.NBugError); if (Settings.DisplayDeveloperUI) { using (var viewer = new InternalExceptionViewer()) { viewer.ShowDialog(NBugConfigurationException.Create(propertyExpression, message)); } } if (Settings.ThrowExceptions) { throw NBugConfigurationException.Create(propertyExpression, message); } }
internal static void Error(string message) { Write(message, LoggerCategory.NBugError); if (Settings.DisplayDeveloperUI) { using (var viewer = new InternalExceptionViewer()) { viewer.ShowDialog(new NBugRuntimeException(message)); } } if (Settings.ThrowExceptions) { throw new NBugRuntimeException(message); } }