commit 269cd03b183669c86df1f7336ade8fff5c566ebd
parent 409ddd9c5668b5cdf67dbebea761c476a317c53a
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sun, 1 Nov 2009 13:43:19 -0500
fix mbox date parsing: catch ArgumentError
Apparently ArgumentError is sometimes thrown on an invalid date as well.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
@@ -14,7 +14,7 @@ module MBox
## hack -- make Time.parse fail when trying to substitute values from Time.now
Time.parse time, 0
true
- rescue NoMethodError
+ rescue NoMethodError, ArgumentError
warn "found invalid date in potential mbox split line, not splitting: #{l.inspect}"
false
end