From 40437c970dc23c100b02f4d07bcf6f8f73ba8e33 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Sun, 7 Dec 2008 21:29:50 +1100 Subject: [PATCH] make format error raise with message --- lib/validates_timeliness/formats.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/validates_timeliness/formats.rb b/lib/validates_timeliness/formats.rb index 3a89c75..83b3039 100644 --- a/lib/validates_timeliness/formats.rb +++ b/lib/validates_timeliness/formats.rb @@ -237,8 +237,7 @@ module ValidatesTimeliness return Regexp.new(regexp), format_proc(order) rescue - puts "The following format regular expression failed to compile: #{regexp}\n from format #{string_format}." - raise + raise "The following format regular expression failed to compile: #{regexp}\n from format #{string_format}." end # Generates a proc which when executed maps the regexp capture groups to a