Skip to content

Commit

Permalink
fix: halt! now throws internally
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfaust committed Aug 23, 2018
1 parent 6bb864f commit 4de4e3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/prism/action.cr
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module Prism
# :nodoc:
def call_with_callbacks
with_callbacks { call }
rescue Halt
end

# Will **not** raise on exceed, defaults to 8 MB.
Expand Down Expand Up @@ -106,7 +107,7 @@ module Prism
json({{response}})
{% end %}

return false
raise Halt.new
end

# Set HTTP status code.
Expand Down Expand Up @@ -182,6 +183,9 @@ module Prism
json(value)
end
{% end %}

private class Halt < Exception
end
end
end

Expand Down

0 comments on commit 4de4e3d

Please sign in to comment.