*error = message;
}
-const char kErrMsgNoPath[] = "Path not specified.";
-const char kErrMsgInvalidPath[] = "Invalid path.";
+const char kErrMsgNoPath[] = "Path not specified";
+const char kErrMsgInvalidPath[] = "Invalid path";
+const char kErrMsgInvalidXml[] = "Invalid xml file";
} // namespace
manifest_ =
parser::LoadManifest(manifest_path.string(), &error_, constraints);
- if (!manifest_.get())
+ if (!manifest_.get()) {
+ SetError(kErrMsgInvalidXml, &error_);
return false;
+ }
if (!ParseManifestData(&error_))
return false;
if (!ValidateAppManifest(&error_))
auto handler = p.second;
if (manifest_data_.find(p.first) != manifest_data_.end() &&
!handler->Validate(*GetManifestData(handler->Key()).get(),
- manifest_data_, error))
+ manifest_data_, error)) {
+ if (error->empty()) {
+ *error = std::string("'") + handler->Key() +
+ "'' handler failed to Validate() without setting error message";
+ }
return false;
+ }
}
return true;
}
if (output)
manifest_data_[handler.second->Key()] = output;
} else {
+ if (error->empty()) {
+ *error = std::string("'") + handler.second->Key() +
+ "'' handler failed to Parse() without setting error message";
+ }
return false;
}
}