Issue #8863 has been updated by alexeymuranov (Alexey Muranov).


matz (Yukihiro Matsumoto) wrote:
> Hmm, defining the behavior to raise UndefinedBehaviorError seems contradiction to me.
> 
> Matz.

It sound like it, but my thought was that a user may catch other types of errors and use them meaningfully, but here it would be clearly advised not to catch it.  I am not sure it is useful, i agree with Feedback status.  I thought first that maybe some other class of Errors can be appropriate, like NotImplementedError, but it does not match the meaning.  It is to leave options open when introducing a new feature.
----------------------------------------
Feature #8863: New error class: UndefinedBehaviorError
https://bugs.ruby-lang.org/issues/8863#change-41630

Author: alexeymuranov (Alexey Muranov)
Status: Feedback
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
I propose to consider introducing a new error class: (({UndefinedBehaviorError})) (or (({UnspecifiedBehaviorError}))).  It would be somewhat similar to (({NotImplementedError})), but it would mean that the behavior is actually unspecified, but may be defined in future versions (of Ruby or of the application).

The purpose is to raise it in "edge cases" of a newly introduced feature, to avoid users' relying on some unintended behavior, and to be able to change the behavior or to raise a different type of error in a future version.

I was thinking about a possible need for something like this in relation to (({Enumerable#to_h})) #7292.
=end



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