Reduce presentation data in validation errors
- Add ValidationError type to hold validation results - Change validation to return lists of ValidationErrors
This commit is contained in:
parent
83fcf4f128
commit
063db01796
12 changed files with 265 additions and 76 deletions
|
|
@ -2254,7 +2254,12 @@ namespace MatterHackers.MatterControl
|
|||
var errors = SettingsValidation.SettingsValid(printer);
|
||||
if(errors.Count > 0)
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n__________________\n\n", errors.ToArray()), "Slice Error".Localize());
|
||||
// Project to newline separated Error/Details string
|
||||
var formattedErrors = errors.Select(err => $"{err.Error}\n\n{err.Details}").ToArray();
|
||||
|
||||
StyledMessageBox.ShowMessageBox(
|
||||
string.Join("\n__________________\n\n", formattedErrors),
|
||||
"Export Error".Localize());
|
||||
}
|
||||
else // there are no erros continue printing
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue