Parse manifest error message fix 63/88163/2
authorBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Tue, 13 Sep 2016 13:31:13 +0000 (15:31 +0200)
committerBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Wed, 14 Sep 2016 07:45:26 +0000 (09:45 +0200)
It fixes ParseManifestTest.HandlesBrokenManifestFile from parser_unittest

Change-Id: I12fa75f728bf216d22e4ba5e8cc323bc62af20ec

src/manifest_parser/manifest_parser_impl.cc

index f030cf97091d4ae0ab4abb2c666067e010ec8213..4a759a3ad843d5bc0c8753abc5f1a630633fd92f 100644 (file)
@@ -23,7 +23,6 @@ void SetError(const std::string& message, std::string* error) {
 
 const char kErrMsgNoPath[] = "Path not specified";
 const char kErrMsgInvalidPath[] = "Invalid path";
-const char kErrMsgInvalidXml[] = "Invalid xml file";
 
 }  // namespace
 
@@ -56,10 +55,8 @@ bool ManifestParserImpl::ParseManifest(const bf::path& manifest_path,
 
   manifest_ =
       parser::LoadManifest(manifest_path.string(), &error_, constraints);
-  if (!manifest_.get()) {
-    SetError(kErrMsgInvalidXml, &error_);
+  if (!manifest_.get())
     return false;
-  }
   if (!ParseManifestData(&error_))
     return false;
   if (!ValidateAppManifest(&error_))