-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show the complete error message #551
Conversation
@sarahelsaig please review it. Maybe this one is better than #550 |
@@ -6,5 +6,5 @@ namespace OrchardCore.Commerce.Endpoints.Extensions; | |||
public static class ConvertLocalizedHtmlString | |||
{ | |||
public static string ConvertLocalizedHtmlStringList(this IReadOnlyList<LocalizedHtmlString> errors) => | |||
string.Join('\n', errors.Select(error => error.Value)); | |||
string.Join(System.Environment.NewLine, errors.Select(error => error.Html())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string.Join(System.Environment.NewLine, errors.Select(error => error.Html())); | |
string.Join(Environment.NewLine, errors.Select(error => error.Html())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add using System;
on the top
public static class ConvertLocalizedHtmlString | ||
{ | ||
public static string ConvertLocalizedHtmlStringList(this IReadOnlyList<LocalizedHtmlString> errors) => | ||
string.Join('\n', errors.Select(error => error.Value)); | ||
string.Join(SystemEnvironment.NewLine, errors.Select(error => error.Html())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use Environment
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OC has it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using Environment = System.Environment;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of this is necessary. Using fully qualified System.Environment.NewLine
is appropriate in this scenario.
Fix #549