[erlang-bugs] typo in diameter_service.erl?

Anthony Ramine <>
Sat Oct 22 11:56:43 CEST 2011


Le 22 oct. 2011 à 07:04, Ulf Wiger a écrit :

> 
> In https://github.com/erlang/otp/blob/master/lib/diameter/src/app/diameter_service.erl#L2028
> 
> fa(Rec, FailedAvp, Dict) ->
>     try
>         {'Failed-AVP', [FailedAvp]}
>     catch
>         error: _ ->
>             Avps = Dict:'get-'('AVP', Rec),
>             A = #diameter_avp{name = 'Failed-AVP',
>                               value = FailedAvp},
>             {'AVP', [A|Avps]}
>     end.
> 
> Shouldn't that be 
> 
> Avps = Dict:'#get-'('AVP', Rec)?
> 
> This is just from visual inspection of the code. I haven't tried actually executing the exception clause.
> 
> BR,
> Ulf W

By the way, how could the exception clause could ever be executed as the tried expression {'Failed-AVP', [FailedAvp]} should never fail?

-- 
Anthony Ramine / @nokusu
Dev:Extend — http://dev-extend.eu/
So as I pray, “Unlimited Erlang Works”



More information about the erlang-bugs mailing list