aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gen_mod.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gen_mod.erl b/src/gen_mod.erl
index 521ed1b3f..c4306577c 100644
--- a/src/gen_mod.erl
+++ b/src/gen_mod.erl
@@ -111,7 +111,14 @@ sort_modules(Host, ModOpts) ->
[DepMod, Mod]);
{DepMod, DepOpts} ->
digraph:add_vertex(G, DepMod, DepOpts),
- digraph:add_edge(G, DepMod, Mod)
+ case digraph:add_edge(G, DepMod, Mod) of
+ {error, {bad_edge, Path}} ->
+ ?WARNING_MSG("cyclic dependency detected "
+ "between modules: ~p",
+ [Path]);
+ _ ->
+ ok
+ end
end
end, Deps)
end, ModOpts),