diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2019-01-07 11:19:50 -0800 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2019-01-07 11:19:50 -0800 |
commit | b59c4a2106ad17d92c15c086c31d5764a0462c16 (patch) | |
tree | fadb2783f2708c4cacbc868bd2ed3ef847c84687 | |
parent | c35933cd1eae7b0881ccd63edbca3afb4c72b771 (diff) | |
download | infinitytier-b59c4a2106ad17d92c15c086c31d5764a0462c16.tar.gz infinitytier-b59c4a2106ad17d92c15c086c31d5764a0462c16.zip |
Print error & exit on local.conf parsing error
-rw-r--r-- | service/OneService.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); } } |