diff --git a/src/kemal/helpers/exceptions.cr b/src/kemal/helpers/exceptions.cr index 53520b3..666cdd9 100644 --- a/src/kemal/helpers/exceptions.cr +++ b/src/kemal/helpers/exceptions.cr @@ -13,7 +13,10 @@ module Kemal::Exceptions end class CustomException < Exception - def initialize(context : HTTP::Server::Context) + def initialize(context : HTTP::Server::Context, message : String = "") + @context = context + @message = message + super "Rendered error with #{context.response.status_code}" end end