On Thu, Aug 04, 2011 at 01:29:39PM -0700, Ian Main wrote:
On Thu, Aug 04, 2011 at 03:32:22PM -0400, Matt Wagner wrote:
> When ApplicationController rescued an exception, no backtrace was printed, making it
nearly impossible to debug.
> ---
> src/app/controllers/application_controller.rb | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/app/controllers/application_controller.rb
b/src/app/controllers/application_controller.rb
> index b6159e5..4ecd2ee 100644
> --- a/src/app/controllers/application_controller.rb
> +++ b/src/app/controllers/application_controller.rb
> @@ -76,6 +76,7 @@ class ApplicationController < ActionController::Base
>
> def handle_error(hash)
> logger.fatal(hash[:error].to_s) if hash[:error]
> + logger.fatal(hash[:error].backtrace.join("\n ")) if hash[:error]
> msg = hash[:message] || hash[:error].message
> title = hash[:title] || "Internal Server Error"
> status = hash[:status] || :internal_server_error
ACK. This just helped me find an error.
Pushed.