aboutsummaryrefslogtreecommitdiff
path: root/brep
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-03-18 01:05:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-03-18 01:05:31 +0300
commit0e77c7fd324b99006b01c248a0e3295d2c07cec9 (patch)
tree06ad0555acaadcb72130b0465cc0b49032d27f2e /brep
parent0b6b57f9acaa2ec648bf582ff67851331f8e6eef (diff)
Make web server to terminate if module fail to initialize
Diffstat (limited to 'brep')
-rw-r--r--brep/module9
-rw-r--r--brep/module.cxx8
2 files changed, 8 insertions, 9 deletions
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);
}