Remove colorize from common exception handler
This commit is contained in:
parent
456724f8e4
commit
e077d17943
1 changed files with 2 additions and 2 deletions
|
@ -6,11 +6,11 @@ class Kemal::CommonExceptionHandler < HTTP::Handler
|
||||||
call_next context
|
call_next context
|
||||||
rescue ex : Kemal::Exceptions::RouteNotFound
|
rescue ex : Kemal::Exceptions::RouteNotFound
|
||||||
context.response.content_type = "text/html"
|
context.response.content_type = "text/html"
|
||||||
Kemal.config.logger.write("Exception: #{ex.inspect_with_backtrace.colorize(:red)}\n")
|
Kemal.config.logger.write("Exception: #{ex.inspect_with_backtrace}\n")
|
||||||
return render_404(context)
|
return render_404(context)
|
||||||
rescue ex
|
rescue ex
|
||||||
context.response.content_type = "text/html"
|
context.response.content_type = "text/html"
|
||||||
Kemal.config.logger.write("Exception: #{ex.inspect_with_backtrace.colorize(:red)}\n")
|
Kemal.config.logger.write("Exception: #{ex.inspect_with_backtrace}\n")
|
||||||
verbosity = Kemal.config.env == "production" ? false : true
|
verbosity = Kemal.config.env == "production" ? false : true
|
||||||
return render_500(context, ex.inspect_with_backtrace, verbosity)
|
return render_500(context, ex.inspect_with_backtrace, verbosity)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue