diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-08 14:33:07 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-08 14:33:07 +0000 |
commit | e320f28945290b527a5634ea473b5a8543d5ab0a (patch) | |
tree | feea0b7c7f3a47896770cdc4edbbe9985df9044d | |
parent | 043bee3338c83b0c409b5217d2f83aa732c0871a (diff) | |
download | rails-e320f28945290b527a5634ea473b5a8543d5ab0a.tar.gz rails-e320f28945290b527a5634ea473b5a8543d5ab0a.tar.bz2 rails-e320f28945290b527a5634ea473b5a8543d5ab0a.zip |
Make the 3rd arg optional for #failsafe_response
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/dispatcher.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index f3350087ad..d5e0345dd5 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -85,13 +85,13 @@ class Dispatcher end # If the block raises, send status code as a last-ditch response. - def failsafe_response(output, status, exception) + def failsafe_response(output, status, exception = nil) yield rescue Object begin output.write "Status: #{status}\r\n" output.write "Content-Type: text/plain\r\n\r\n" - output.write exception.to_s + "\r\n" + exception.backtrace.join("\r\n") + output.write exception.to_s + "\r\n" + exception.backtrace.join("\r\n") if exception rescue Object end end |