Skip to content

Commit 5b979ad

Browse files
committed
Merge pull request #27 from ndushay/exceptions-fix
fix mistaken references to OAI::ArgumentError (now OAI::ArgumentExceptio...
2 parents 05e22ca + 54e0f61 commit 5b979ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/oai/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def parse_date(value)
314314
Date.parse(value) # This will raise an exception for badly formatted dates
315315
Time.parse(value).utc # Sadly, this will not
316316
rescue
317-
raise OAI::ArgumentError.new
317+
raise OAI::ArgumentException.new, "unparsable date: '#{value}'"
318318
end
319319

320320
# Strip out invalid UTF-8 characters. Regex from the W3C, inverted.

lib/oai/provider/response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def parse_date(value)
9494
Date.parse(value) # This will raise an exception for badly formatted dates
9595
Time.parse(value).utc # -- UTC Bug fix hack 8/08 not in core
9696
rescue
97-
raise OAI::ArgumentError.new
97+
raise OAI::ArgumentException.new, "unparsable date: '#{value}'"
9898
end
9999

100100
def internalize(hash = {})

0 commit comments

Comments
 (0)