aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve
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
parent326bbd320dbabc075fd7e59e55a715c7d4e9d6b9 (diff)
See debian/changelog
Diffstat (limited to 'lib/mauve')
-rw-r--r--lib/mauve/alert.rb9
-rw-r--r--lib/mauve/http_server.rb2
2 files changed, 9 insertions, 2 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
diff --git a/lib/mauve/http_server.rb b/lib/mauve/http_server.rb
index b4ced32..69b566b 100644
--- a/lib/mauve/http_server.rb
+++ b/lib/mauve/http_server.rb
@@ -94,7 +94,7 @@ module Mauve
end
def main_loop
- @server = ::Thin::Server.new(@ip, @port, Rack::CommonLogger.new(Rack::Chunked.new(Rack::ContentLength.new(WebInterface.new)), RackErrorsProxy.new(@logger)), :signals => false)
+ @server = ::Thin::Server.new(@ip, @port, Rack::CommonLogger.new(Rack::Chunked.new(Rack::ContentLength.new(WebInterface.new)), RackErrorsProxy.new(logger)), :signals => false)
@server.start
end