-
Notifications
You must be signed in to change notification settings - Fork 161
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
Error() should word-wrap error messages, not break them in the middle of a word #1197
Comments
I think it would also be an improvement to have the |
Since I have been hacking on the input/output code, I just want to make 2 points:
|
@markuspf I'm happy with any solution that makes the errors easier to read. |
@markuspf the |
In particular, SCSCP is doing this in order to catch an error message on the server and send it back to the client instead of triggering a break loop on the server. |
@fingolfin thanks for the hint, I wasn't aware of that. |
As to the line break in the wrong place: My guess was right.
Now, each call to PrintTo opens stderr by calling
There are multiple ways to address this, each with its own pros and cons:
|
From a comment by @james-d-mitchell on issue #1195:
Note how the word "with" is split after the "w". Here is an experiment I just did myself:
Note how this is not only breaking the message in the middle of a word (though at least with a
\
indicating this), but it also breaks too late, and thus we end up with a very short text line between two longer ones (my guess is that GAP fails to take the stringError,
into account for the wrapping).Both of these issues should be fixed. Here is a suggestion:
The wrapping indicator
\
probably should only be shown in the last case.The text was updated successfully, but these errors were encountered: