Skip to content

Commit

Permalink
Only catch WeberControllerException exceptions for re-handling render…
Browse files Browse the repository at this point in the history
… actions
  • Loading branch information
rcdilorenzo committed Jun 13, 2014
1 parent bd79f3a commit 928e237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/weber/handler/weber_req_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ defmodule Handler.WeberReqHandler do
result = try do
Module.function(controller, action, 2).(data, conn)
rescue
e ->
e in WeberControllerException ->
if e.message in controller.raise_keys do
controller.render_value_for_key(e.message)
else
Expand Down Expand Up @@ -173,4 +173,4 @@ defmodule Handler.WeberReqHandler do
:erlang.list_to_binary(lang)
end

end
end

0 comments on commit 928e237

Please sign in to comment.