From f1c3d250d151a450c67e755df5f5cdc7497f4b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 27 Jan 2014 18:19:48 +0100 Subject: [PATCH] Feature #2665: Throw errors for bad federation conf in oned.conf --- src/nebula/Nebula.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/nebula/Nebula.cc b/src/nebula/Nebula.cc index 14c9943388..af7474c050 100644 --- a/src/nebula/Nebula.cc +++ b/src/nebula/Nebula.cc @@ -423,7 +423,8 @@ void Nebula::start(bool bootstrap_only) } else { - // TODO: error + throw runtime_error( + "FEDERATION MODE must be one of STANDALONE, MASTER, SLAVE."); } if (federation_enabled) @@ -432,14 +433,16 @@ void Nebula::start(bool bootstrap_only) if (rc != 0) { - // TODO: error + throw runtime_error("FEDERATION ZONE_ID must be set for " + "federated instances."); } master_oned = vatt->vector_value("MASTER_ONED"); if (master_oned.empty()) { - // TODO: error + throw runtime_error( + "FEDERATION MASTER_ONED endpoint is missing."); } } }