aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert.rb
diff options
context:
space:
mode:
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