You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, the "long msg" is duplicated, and the message itself is printed in "repr" form, meaning that newlines (and other control characters) show up as "\n" and the message is basically completely unreadable.
The problem appears to be rooted here. The problem is that the "go syntax" repr and the "quoted" repr aren't equal, so it's written twice, and what's written isn't written in a useful way. I understand that, in general, you want to have this kind of representation for arbitrary interface{} values, but for error I think there should be some kind of new representation which makes use of isMultiLine, and at the very least doesn't duplicate all the internal baseError data or write the error message twice. I was working on a P/R but I wasn't sure what that new representation should be.
The text was updated successfully, but these errors were encountered:
I have a function that returns an error that includes a stack trace:
When I test for nil on the error, the error message is long and not super helpful:
In this case, the "long msg" is duplicated, and the message itself is printed in "repr" form, meaning that newlines (and other control characters) show up as "\n" and the message is basically completely unreadable.
The problem appears to be rooted here. The problem is that the "go syntax" repr and the "quoted" repr aren't equal, so it's written twice, and what's written isn't written in a useful way. I understand that, in general, you want to have this kind of representation for arbitrary
interface{}
values, but for error I think there should be some kind of new representation which makes use ofisMultiLine
, and at the very least doesn't duplicate all the internal baseError data or write the error message twice. I was working on a P/R but I wasn't sure what that new representation should be.The text was updated successfully, but these errors were encountered: