Issue #11295 has been updated by Robb Shecter.


Koichi Sasada wrote:
> 
> If you have any idea, please tell us.
> We can consider about Ruby's error message APIs to realize your ideas.
> (I can't guarantee we can implement your ideas :p)

Again, thanks for posting this. 

I believe that some small changes can make Ruby error messages more helpful. E.g., I've just begun working on a Pull Request to change the rb_eArgError messages from e.g. "2 for 3" to "2 were expected, but 3 were given." Or even, "2 were expected, but 3 were given: <arg1.class>, <arg2.class>, <arg3.class>."

This change would *greatly* increase the usefulness and friendlyness of the interpreter, for relatively little work.

----------------------------------------
Misc #11295: Request for comments about error messages
https://bugs.ruby-lang.org/issues/11295#change-54516

* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
(This is not a proposal, bug reports)

Ruby shows error messages when something wrong.

There are several proposals to extend error messages.

* https://github.com/charliesome/better_errors
* https://github.com/yuki24/did_you_mean
* https://github.com/ko1/pretty_backtrace

And some requests.

* Reverse backtrace and show error messages at the bottom (to avoid scroll up terminal)
* Translation error messages to other languages

If you have any idea, please tell us.
We can consider about Ruby's error message APIs to realize your ideas.
(I can't guarantee we can implement your ideas :p)




-- 
https://bugs.ruby-lang.org/