Skip to content

Commit

Permalink
Fix recent changes to CustomException (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Feb 14, 2024
1 parent bef7351 commit 7c47bbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kemal/helpers/exceptions.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module Kemal::Exceptions
end

class CustomException < Exception
def initialize(context : HTTP::Server::Context, message : String = "")
@context = context
@message = message
def initialize(@context : HTTP::Server::Context, message : String? = nil)
message ||= "Rendered error with #{context.response.status_code}"
super message
end
end
end

0 comments on commit 7c47bbc

Please sign in to comment.