From b59c4a2106ad17d92c15c086c31d5764a0462c16 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 7 Jan 2019 11:19:50 -0800 Subject: Print error & exit on local.conf parsing error --- service/OneService.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/OneService.cpp b/service/OneService.cpp index 84d801db..69bbfeb0 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1035,10 +1035,12 @@ public: try { _localConfig = OSUtils::jsonParse(lcbuf); if (!_localConfig.is_object()) { - fprintf(stderr,"WARNING: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S); + fprintf(stderr,"ERROR: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S); + exit(1); } } catch ( ... ) { - fprintf(stderr,"WARNING: unable to parse local.conf (invalid JSON)" ZT_EOL_S); + fprintf(stderr,"ERROR: unable to parse local.conf (invalid JSON)" ZT_EOL_S); + exit(1); } } -- cgit v1.2.3