lib/global_session/rack.rb in global_session-1.0.4 vs lib/global_session/rack.rb in global_session-1.0.5

- old
+ new

@@ -164,10 +164,14 @@ # === Parameters # activity(String): name of activity in which error happened # env(Hash): Rack environment # e(Exception): error that happened def handle_error(activity, env, e) - env['rack.logger'].error("#{e.class} while #{activity}: #{e} #{e.backtrace}") if env['rack.logger'] + if env['rack.logger'] + msg = "#{e.class} while #{activity}: #{e}" + msg += " #{e.backtrace}" unless e.is_a?(ExpiredSession) + env['rack.logger'].error(msg) + end if e.is_a?(ClientError) || e.is_a?(SecurityError) env['global_session.error'] = e wipe_cookie(env) elsif e.is_a? ConfigurationError