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
Add options to binary construction error_info formatting #5752
Conversation
CT Test Results 5 files 251 suites 1h 59m 46s ⏱️ For more details on these failures, see this check. Results for commit 5a521ef. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
Thanks for your pull request. The test case |
* override_segment_position is used by erl_eval/eval_bits to override the actual binary segment * pretty_printer can be used by other BEAM languages to customize how values in error messages are printed Prior to this commit, binary construction errors in the shell reported the following: 1> A = "foo". "foo" 2> <<A/integer>>. ** exception error: bad argument in function eval_bits:eval_exp_field1/6 (eval_bits.erl, line 123) With this commit: 1> A = "foo". "foo" 2> <<A/integer>>. ** exception error: construction of binary failed in function eval_bits:eval_exp_field/6 (src/eval_bits.erl, line 143) *** segment 1 of type 'integer': expected an integer but got: "foo" 3> <<0, A/integer>>. ** exception error: construction of binary failed in function eval_bits:eval_exp_field/6 (src/eval_bits.erl, line 143) *** segment 2 of type 'integer': expected an integer but got: "foo"
3d23015
to
5a521ef
Compare
@bjorng fixed, ty! |
Thanks! Added to our daily builds. |
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.
This PR looks good to me and no issues were found in our daily builds.
Will you update the EEP?
Thanks for your pull request. |
The new options are:
override_segment_position
is used by erl_eval/eval_bitsto override the actual binary segment
pretty_printer
can be used by other BEAM languages tocustomize how values in error messages are printed
Prior to this commit, binary construction errors in the
shell reported the following:
With this commit: