aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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