comparison OrthancServer/OrthancInitialization.cpp @ 1596:f2e3d030ea59

BadJson error code
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Aug 2015 15:36:43 +0200
parents d73124f6b439
children 2dff2bdffdb8
comparison
equal deleted inserted replaced
1595:e1e54a73ba8b 1596:f2e3d030ea59
135 Json::Value tmp; 135 Json::Value tmp;
136 Json::Reader reader; 136 Json::Reader reader;
137 if (!reader.parse(content, tmp) || 137 if (!reader.parse(content, tmp) ||
138 tmp.type() != Json::objectValue) 138 tmp.type() != Json::objectValue)
139 { 139 {
140 LOG(ERROR) << "Bad file format for this configuration file: " << path; 140 LOG(ERROR) << "The configuration file does not follow the JSON syntax: " << path;
141 throw OrthancException(ErrorCode_BadFileFormat); 141 throw OrthancException(ErrorCode_BadJson);
142 } 142 }
143 143
144 Toolbox::CopyJsonWithoutComments(config, tmp); 144 Toolbox::CopyJsonWithoutComments(config, tmp);
145 } 145 }
146 146