aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-04-19 10:19:20 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-04-19 10:19:20 +0100
commit6ced3e595069a830b666e88086ba84941ebd3cf6 (patch)
treec0d9d60864315796793f882fce3d5b0be2dea77e /lib/mauve/alert.rb
parent326bbd320dbabc075fd7e59e55a715c7d4e9d6b9 (diff)
See debian/changelog
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r--lib/mauve/alert.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb
index 374762d..a95f761 100644
--- a/lib/mauve/alert.rb
+++ b/lib/mauve/alert.rb
@@ -369,7 +369,14 @@ module Mauve
alert_db.update_type = :changed
end
- logger.error "Couldn't save update #{alert} because of #{alert_db.errors}" unless alert_db.save
+ if !alert_db.save
+ if alert_db.errors.respond_to?("full_messages")
+ msg = alert_db.errors.full_messages
+ else
+ msg = alert_db.errors.inspect
+ end
+ logger.error "Couldn't save update #{alert} because of #{msg}" unless alert_db.save
+ end
end
# If this is a complete replacement update, find the other alerts