Skip to content
Snippets Groups Projects
Commit a819b51a authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Master: Complain about inherited joinnodes and dirnodes.

A common cause for this is an attempt to inherit a module that is a dirnode.

Complaining at creation time makes it easier to find the mistake.
parent c0a4fa7d
No related branches found
No related tags found
No related merge requests found
......@@ -1967,6 +1967,11 @@ class dirnode (string dirname, object|void compilation_handler,
protected void create()
{
if (!dirname) {
error("Attempt to create a dirnode without a directory.\n"
"Have you inherited a dirnode?\n");
}
resolv_debug ("dirnode(%O,%O) created with name %O\n", dirname,
compilation_handler, name);
fc[dirname]=this;
......@@ -2323,6 +2328,11 @@ class joinnode (array(object|mapping) joined_modules,
fallback_module = ([]);
}
if (!joined_modules) {
error("Attempt to create a joinnode without joined modules.\n"
"Have you inherited a joinnode?\n");
}
if (!name)
{
mapping(string:int(1..1)) names = ([]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment