-
Notifications
You must be signed in to change notification settings - Fork 162
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
Improve some kernel error messages #2955
Conversation
Picky, I don't really like the messages
EDIT: I'm happy with |
src/error.h
Outdated
*/ | ||
#define RequireSmallInt(funcname, op, argname) \ | ||
RequireArgumentCondition(funcname, op, argname, IS_INTOBJ(op), \ | ||
"must be an integer") |
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.
Should the refer to the "smallness" of the required integer somehow?
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.
Ouch, indeed, that's a copy&past mistake. I'll change it to "must be a small integer"
How about |
28e53d9
to
48b352c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2955 +/- ##
==========================================
+ Coverage 83.79% 83.81% +0.01%
==========================================
Files 682 682
Lines 346236 346046 -190
==========================================
- Hits 290135 290043 -92
+ Misses 56101 56003 -98
|
This changes error messages like Error, E: <n> must be a positive small integer (not a integer) Error, OnTuples: <tuple> must be a small list (not a boolean or fail) to something like this: Error, E: <n> must be a positive small integer (not the integer 0) Error, OnTuples: <tuple> must be a small list (not fail) Specifically, small integers are printed as part of the error message; and for the three T_BOOL values true, false and fail, we print them, too.
48b352c
to
419b750
Compare
This continues the work begun in PR #2947 and implements the change I promised there: Instead of "(not a integer)" we now say for example "(not the integer 5)".
Also adds and uses
RequireStringRep
,RequireInt
,RequireSmallInt