we currently have a very convoluted methodology for displaying error messages. But right now, I would just like to know how to correct one specific message.
The code used to build the message is:
/// Adds the error details.
/// <param name="message">The message.</param>
/// <param name="errors">The errors.</param>
private void AddErrorDetails(ref string message, Dictionary<string, string> errors)
if (errors == null)
if (message == null)
message = string.Empty;
foreach (string key in errors.Keys)
message += Environment.NewLine;
if (key != null)
message += errors[key];
the resulting message looks like:
I would like it to be more like:
Delivery succeeded but with errors. See below for details.
Adjusting stock: NrfiInd=N, ParentMals UIC = 09107, Niin = 007345641, Location - Staging......
you get the idea.
Any help would be appreciated.