From 3184560b5218aa4916a26c0e89802416a6149ef0 Mon Sep 17 00:00:00 2001 From: Alex Legler Date: Sat, 20 Sep 2014 22:02:31 +0200 Subject: Be more resilient to bad notices --- lib/notice_store.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notice_store.rb b/lib/notice_store.rb index 098c25e..379ab2a 100644 --- a/lib/notice_store.rb +++ b/lib/notice_store.rb @@ -19,8 +19,8 @@ class NoticeStore Dir.glob('data/notices/*.txt') do |file| begin @notices << Notice.from_file(file) - rescue ArgumentError - $stderr.puts 'Invalid notice: %s' % file + rescue => e + $stderr.puts 'Invalid notice (%s): %s' % [e.message, file] end end -- cgit v1.2.3-65-gdbad