nitpicker: improve diagnostic of policy configuration

This patch adds diagnostic messages during the label-policy application,
if no policy for the session label was found or if the domain configured
in the policy node does not exist.
This commit is contained in:
Christian Helmuth 2015-12-03 15:15:05 +01:00
parent 23f9761297
commit 2b321b9ce8
1 changed files with 5 additions and 1 deletions

View File

@ -219,7 +219,11 @@ class Session : public Session_list::Element
Domain_name name(buf);
_domain = domain_registry.lookup(name);
} catch (...) { }
if (!_domain)
PERR("policy for label \"%s\" specifies nonexistent domain \"%s\"",
_label.string(), name.string());
} catch (...) { PERR("no policy matching label \"%s\"", _label.string()); }
}
};