mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-13 22:12:56 +00:00
Print error & exit on local.conf parsing error
This commit is contained in:
parent
c35933cd1e
commit
b59c4a2106
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user