-
Notifications
You must be signed in to change notification settings - Fork 417
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
Standardized parsing errors #1227
base: dev
Are you sure you want to change the base?
Conversation
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.
The return behaviour L2186/2190 is inconsistent, doesn't matter but would be nice if both do the "same thing"
The goal was to make L2186 consistent with the zlib parsing error above. I would say making those "both do the same thing" as you put it makes more sense to me considering they're very similar errors, compared to a different return statement at the bottom. |
Did we figure out the performance impact of this? |
Ran a quick test and it seems like the impact is around ~30% for just the parsing code. Doesn't seem to make a noticeable difference to the overall function's performance. What I did for the test was add some |
As far as I know, the main cases where this code throws are Discord outages and internet problems. In both cases (and I presume in any case really), the actual syntax error is irrelevant. Adding a standard prefix to the error message is already done for zlib errors a few lines above, and makes it easier to determine the actual error.