Project

General

Profile

Actions

Feature #8863

closed

New error class: UndefinedBehaviorError

Added by alexeymuranov (Alexey Muranov) over 10 years ago. Updated about 10 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:57021]

Description

=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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0