Skip to content

Commit

Permalink
Merge pull request #5 from atomvm/improve-error-reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGrumpy committed Oct 13, 2023
2 parents be939d9 + a7b372e commit 5947bdf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/packbeam_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,18 @@ get_data(ParsedFile) ->

%% @private
get_parsed_file(Module, ParsedFiles) ->
{value, V} = lists:search(
SearchResult = lists:search(
fun(ParsedFile) ->
proplists:get_value(module, ParsedFile) =:= Module
end,
ParsedFiles
),
V.
case SearchResult of
{value, V} ->
V;
false ->
exit({module_not_found, Module, ParsedFiles})
end.

%% @private
intersection(A, B) ->
Expand Down

0 comments on commit 5947bdf

Please sign in to comment.