mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add message support to Kemal::Exceptions::CustomException (#671)
This commit is contained in:
parent
9628043e4c
commit
bb9105f202
1 changed files with 4 additions and 1 deletions
|
@ -13,7 +13,10 @@ module Kemal::Exceptions
|
||||||
end
|
end
|
||||||
|
|
||||||
class CustomException < Exception
|
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}"
|
super "Rendered error with #{context.response.status_code}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue