Use get_value/3 to handle default
This commit is contained in:
parent
ed3e62b40a
commit
095d0f0d0a
@ -738,11 +738,11 @@ dbg_loc(Env, Ann) ->
|
|||||||
case proplists:get_value(debug_info, Env#env.options, false) of
|
case proplists:get_value(debug_info, Env#env.options, false) of
|
||||||
false -> [];
|
false -> [];
|
||||||
true ->
|
true ->
|
||||||
File = case proplists:get_value(file, Ann) of
|
File = case proplists:get_value(file, Ann, no_file) of
|
||||||
no_file -> "";
|
no_file -> "";
|
||||||
F -> F
|
F -> F
|
||||||
end,
|
end,
|
||||||
Line = proplists:get_value(line, Ann),
|
Line = proplists:get_value(line, Ann, undefined),
|
||||||
case Line of
|
case Line of
|
||||||
undefined -> [];
|
undefined -> [];
|
||||||
_ -> [{'DBG_LOC', {immediate, File}, {immediate, Line}}]
|
_ -> [{'DBG_LOC', {immediate, File}, {immediate, Line}}]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user