Skip to content
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

Parser server error handling improvements #3035

Merged

Conversation

jonsequitur
Copy link
Contributor

@jonsequitur jonsequitur commented Jun 12, 2023

This PR:

@jonsequitur jonsequitur force-pushed the parser-server-error-handling-improvements branch from fef6d15 to 35ecfba Compare June 12, 2023 23:51
.Which
.ErrorMessage
.Message
.Should()
.Contain($"Unable to parse an interactive document with type '{(int)request.SerializationType}'");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is orthogonal - but should our exception messages be localized?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't typically localize exception messages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption was that exception messages should be localized if they can ever end up being displayed to the end user...

For C#, we would display localized messages for compilation errors etc., would we not? It seems strange that we would always display English messages for any errors that originate within .NET Interactive itself...

@@ -33,7 +33,7 @@ internal static class StringExtensions
}
else if (lines.Length > 1)
{
firstLine = firstLine + " ...";
// firstLine = firstLine + " ...";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional or something temporary that you meant to revert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't mean to revert it. The logic looked weird so I was checking if it's actually needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just appending ellipsis if the content happens to span multiple lines (since we are trimming out all lines except the first one). I think it should be preserved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll replace this in my next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants