forked from iconara/cql-rb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Raise specific errors with invalid UUID cases
It would be more helpful for developers integrating functionality at a higher level if errors raised for invalid UUIDs are namespaced. This adds a new Cql::Uuid::InvalidUuidError that improves two cases: - The fix for jruby issue jruby/jruby#1608 is no longer necessary because we are now raising an explicit error describing that the UUID is invalid - so the reliance on raising an ArgumentError in order to maintain consistency for Integer is no longer necessary. - The error messages are now more specific, and therefore more helpful for when a developer is doing an integration. On the same note, the errors being namespaced specifically under Cql::Uuid allows for a rescue for specific cases, instead of the higher-level ArgumentError that could occur in many other places, for many other reasons.
- Loading branch information
Russell Cloak
committed
Aug 5, 2014
1 parent
3d1ab79
commit f3bd764
Showing
2 changed files
with
12 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters