Skip to content

Commit

Permalink
Prevent problems with "Value" variable in code
Browse files Browse the repository at this point in the history
Such code could lead to hard-to-find problem:

    Value = 10, %% this will lead to {error, case_clause} 
    ?get_json_value(<<"key">>, Json).
  • Loading branch information
kachayev committed Jun 20, 2013
1 parent 24e705c commit 4d8cf1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/etest_http.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ end)(Value0, Res))).
[{json_struct, __JsonStruct},
{module, ?MODULE},
{line, ?LINE}] });
Value -> Value
__JsonValue -> __JsonValue
end;

(__Key, __Res) ->
Expand All @@ -184,7 +184,7 @@ end)(Value0, Res))).
undefined -> erlang:error({json_val_undefined,
[{module, ?MODULE},
{line, ?LINE}] });
Value -> Value
__JsonValue -> __JsonValue
end
end)(__Key, __Response))).

Expand Down

0 comments on commit 4d8cf1c

Please sign in to comment.