mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Print error & exit on local.conf parsing error
This commit is contained in:
parent
c35933cd1e
commit
b59c4a2106
1 changed files with 4 additions and 2 deletions
|
@ -1035,10 +1035,12 @@ public:
|
||||||
try {
|
try {
|
||||||
_localConfig = OSUtils::jsonParse(lcbuf);
|
_localConfig = OSUtils::jsonParse(lcbuf);
|
||||||
if (!_localConfig.is_object()) {
|
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 ( ... ) {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue