fixed small redundancy.

This commit is contained in:
Joris Moriau 2016-02-14 13:57:51 +01:00
parent 9ae01c68e9
commit f5b5260ab9

View file

@ -5,10 +5,10 @@ class Kemal::CommonErrorHandler < HTTP::Handler
begin
call_next context
rescue ex : Kemal::Exceptions::RouteNotFound
Kemal.config.logger.write("Exception: #{ex.to_s}: #{ex.message}\n")
Kemal.config.logger.write("Exception: #{ex.to_s}\n")
return render_404(context)
rescue ex
Kemal.config.logger.write("Exception: #{ex.to_s}: #{ex.message}\n")
Kemal.config.logger.write("Exception: #{ex.to_s}\n")
return render_500(context, ex.to_s)
end
end