Issue #5866 has been updated by matz (Yukihiro Matsumoto).

Status changed from Feedback to Rejected

The term `Validation` may have different meaning upon applications. There's no reason to treat them uniformly.
In addition, we already have many `ValidationError` in many gems. Adding canonical `ValidationError` can cause incompatibility.

Matz.


----------------------------------------
Feature #5866: ValidationError
https://bugs.ruby-lang.org/issues/5866#change-74388

* Author: trans (Thomas Sawyer)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
I've come across this from time to time, where some piece of complex data, often (but not always) loaded from a file, doesn't conform to some set of validation requirements. I've never been quite sure what type of error to throw if the data doesn't conform. It's not exactly an ArgumentError, it's more complex then that and not necessarily coming in via method arguments, nor is it exactly a TypeError since it's not necessarily anything to do with a specific class. So I find myself falling back to Runtime error and rolling my own, but thinking it would be nice if there were a general purpose `ValidationError` to raise or subclass in these cases.





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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>