Skip to content

Commit

Permalink
Merge pull request #5 from shizzard/master
Browse files Browse the repository at this point in the history
z_apply custom errors
  • Loading branch information
si14 committed Nov 14, 2012
2 parents e27f29e + 2ec5ae2 commit 292c85e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/z_validate.erl
Expand Up @@ -83,6 +83,7 @@ z_apply(Fun, ?Z_VALUE(_, Err)=ZVal) ->
z_apply(Fun, ?Z_VALUE(Val, _Err), NewErr) ->
case catch Fun(Val) of
{ok, NewVal} -> ?Z_VALUE(NewVal, NewErr);
{error, Err} -> ?THROW_Z_ERROR(Err);
_ -> ?THROW_Z_ERROR(NewErr)
end.

Expand Down

0 comments on commit 292c85e

Please sign in to comment.