public static void Log(WpException exception) { if (WriteInConsole) ConsoleLogger.Log(exception); if (WriteInDiagnostics) DiagnosticLogger.Log(exception); if (WriteInDb) DbLog.Log(exception); if (WriteInFile) FileLogger.Log(exception, LogFilePath); }
public static MessagingCenterResponse CreateError(WpException exception) { return new MessagingCenterResponse { Content = string.Empty, ErrorCode = exception.ErrorCode, Error = exception.Message, Metadata = exception.Metadata, Exception = exception }; }
public MessagingCenterResponse ErrorResponse(MessagingCenterPackage package, string message, int errorCode, Exception exception = null) { WpException mex = new WpException(errorCode, message, exception) { Metadata = JsonConvert.SerializeObject(package) }; Logger.Log(mex); return MessagingCenterResponse.CreateError(mex); }
public static void Log(WpException exception) { WriteLog($"Error code : {exception.ErrorCode}\n" + $"Exception : {exception.Message}\n" + $"StackTrace : {exception.StackTrace}\n"); }
public static void ShowError(WpException exception, Form parent = null) { ShowError("ERROR : " + exception.Message + "\n" + "ERROR CODE : " + exception.ErrorCode + "\n" + (!string.IsNullOrEmpty(exception.Metadata) ? "METADATA : " + exception.Metadata : string.Empty), parent); }
public static void Log(WpException exception, string filePath) { throw new NotImplementedException(); }