From 0e77c7fd324b99006b01c248a0e3295d2c07cec9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Mar 2016 01:05:31 +0300 Subject: Make web server to terminate if module fail to initialize --- brep/module | 9 +++++---- brep/module.cxx | 8 +++----- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'brep') diff --git a/brep/module b/brep/module index 3796399..7e5763a 100644 --- a/brep/module +++ b/brep/module @@ -141,7 +141,8 @@ namespace brep virtual void init (cli::scanner&) = 0; - // Can be overriden by custom request dispatcher to initialize sub-modules. + // Can be overriden by custom request dispatcher to initialize + // sub-modules. // virtual void init (const name_values&); @@ -158,9 +159,9 @@ namespace brep // web::module interface. // public: - // Custom request dispatcher can aggregate its own option descriptions with - // sub-modules option descriptions. In this case it should still call the - // base implementation in order to include the brep::module's options. + // Custom request dispatcher can aggregate its own option descriptions + // with sub-modules option descriptions. In this case it should still call + // the base implementation in order to include the brep::module's options. // virtual option_descriptions options (); diff --git a/brep/module.cxx b/brep/module.cxx index 40acad9..68969eb 100644 --- a/brep/module.cxx +++ b/brep/module.cxx @@ -30,11 +30,9 @@ namespace brep try { - if (!initialized_) - { - MODULE_DIAG; - fail << "not initialized, presumably due to misconfiguration"; - } + // Web server should terminate if initialization failed. + // + assert (initialized_); return handle (rq, rs); } -- cgit v1.1