summaryrefslogtreecommitdiff
path: root/lib/nickserver
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nickserver')
-rw-r--r--lib/nickserver/dispatcher.rb6
-rw-r--r--lib/nickserver/reel_server.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/nickserver/dispatcher.rb b/lib/nickserver/dispatcher.rb
index f9801d1..26ad09e 100644
--- a/lib/nickserver/dispatcher.rb
+++ b/lib/nickserver/dispatcher.rb
@@ -40,8 +40,8 @@ module Nickserver
def handle(request)
handler_chain.handle request
rescue RuntimeError => exc
- puts "Error: #{exc}"
- puts exc.backtrace
+ $stderr.puts "Error: #{exc}"
+ $stderr.puts exc.backtrace
ErrorResponse.new(exc.to_s)
end
@@ -64,7 +64,7 @@ module Nickserver
def proxy_error_response
exc = handler_chain.rescued_exceptions.first
if exc
- puts " Error: #{exc}"
+ $stderr.puts " Error: #{exc}"
Nickserver::Response.new 502,
JSON.dump(error: exc.to_s)
end
diff --git a/lib/nickserver/reel_server.rb b/lib/nickserver/reel_server.rb
index 9a7053b..79265ec 100644
--- a/lib/nickserver/reel_server.rb
+++ b/lib/nickserver/reel_server.rb
@@ -36,8 +36,8 @@ module Nickserver
handler = handler_for(request)
handler.respond_to params(request), request.headers
rescue StandardError => e
- puts e
- puts e.backtrace.join "\n "
+ $stderr.puts e
+ $stderr.puts e.backtrace.join "\n "
request.respond 500, "{}"
end