From 12bd496f27068a17212ec2f6470cb60f63d926f7 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 29 Jul 2010 14:49:30 +0900 Subject: [PATCH] Avoid TypeError thrown by adding nil to String --- .../action_dispatch/middleware/show_exceptions.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index e095b51..546d7f5 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -134,7 +134,7 @@ module ActionDispatch ActiveSupport::Deprecation.silence do message = "\n#{exception.class} (#{exception.message}):\n" - message << exception.annoted_source_code if exception.respond_to?(:annoted_source_code) + message << exception.annoted_source_code if exception.respond_to?(:annoted_source_code) && exception.annoted_source_code message << " " << application_trace(exception).join("\n ") logger.fatal("#{message}\n\n") end -- 1.7.2