Remove additional presentation data from validation errors
- Add location property - Have caller concatenate Location with Details
This commit is contained in:
parent
063db01796
commit
a3cc4c8f96
6 changed files with 81 additions and 81 deletions
|
|
@ -245,8 +245,14 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
// Project to newline separated Error/Details string
|
||||
var formattedErrors = exportErrors.Select(err => $"{err.Error}\n\n{err.Details}").ToArray();
|
||||
// Project to newline separated Error/Details/Location string
|
||||
var formattedErrors = exportErrors.Select(err =>
|
||||
{
|
||||
// Conditionally combine Error/Details/Location when not empty
|
||||
return err.Error +
|
||||
((string.IsNullOrWhiteSpace(err.Details)) ? "" : $"\n\n{err.Details}") +
|
||||
((string.IsNullOrWhiteSpace(err.Location)) ? "" : $"\n\n{err.Location}");
|
||||
}).ToArray();
|
||||
|
||||
StyledMessageBox.ShowMessageBox(
|
||||
string.Join("\n__________________\n\n", formattedErrors),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue