From 2b321b9ce8a31730893bf0342ef92a5e76a0841e Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 3 Dec 2015 15:15:05 +0100 Subject: [PATCH] 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. --- repos/os/src/server/nitpicker/session.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/nitpicker/session.h b/repos/os/src/server/nitpicker/session.h index 1db716abd..ddd8bcf0a 100644 --- a/repos/os/src/server/nitpicker/session.h +++ b/repos/os/src/server/nitpicker/session.h @@ -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()); } } };