summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2014-09-20 22:02:31 +0200
committerAlex Legler <alex@a3li.li>2014-09-20 22:03:03 +0200
commit3184560b5218aa4916a26c0e89802416a6149ef0 (patch)
tree2f63abb36c075e203cb80a0f44eb8610d2bc7946
parentRefactor notice selection and make it more foolproof for empty affects blocks. (diff)
downloadinfra-status-3184560b5218aa4916a26c0e89802416a6149ef0.tar.gz
infra-status-3184560b5218aa4916a26c0e89802416a6149ef0.tar.bz2
infra-status-3184560b5218aa4916a26c0e89802416a6149ef0.zip
Be more resilient to bad notices
-rw-r--r--lib/notice_store.rb4
1 files 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