Skip to content

Fix a bug with long error message#17

Merged
onokonem merged 1 commit intoDjarvur:masterfrom
takady:fix-long-message-bug
Jan 8, 2021
Merged

Fix a bug with long error message#17
onokonem merged 1 commit intoDjarvur:masterfrom
takady:fix-long-message-bug

Conversation

@takady
Copy link
Copy Markdown
Contributor

@takady takady commented Jan 6, 2021

I could see do not define dynamic errors, use wrapped static errors instead when the format string is longer than a certain length, even though it wraps an error properly. That's because of using String() which returns a shortened string if the value is long. (ref: https://golang.org/pkg/go/constant/#Value)

@onokonem
Copy link
Copy Markdown
Member

onokonem commented Jan 6, 2021

Merging is blocked
The base branch requires all commits to be signed. Learn more about signing commits.

@takady, would you be able to recreate your commits, or should I recreate your PR myself?

Use ExactString() because String() returns shortened string if the
value is long
@takady takady force-pushed the fix-long-message-bug branch from ae6f159 to 17e30d3 Compare January 7, 2021 01:19
@takady
Copy link
Copy Markdown
Contributor Author

takady commented Jan 7, 2021

@onokonem I just recreated my commit with sign!

@onokonem onokonem merged commit aea10b5 into Djarvur:master Jan 8, 2021
@takady takady deleted the fix-long-message-bug branch January 12, 2021 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants