[Issue#] LINUXWRT-478
[Bug] Crash of wrt-installer with wrong error code
[Cause] N/A
[Solution] Check if config.xml file actually exist before parsing
[Verification] Run:
wrt-extra-tests-w3c --output=text --regexp='_dq'
wrt-extra-tests-w3c --output=text --regexp='_dw'
wrt-extra-tests-w3c --output=text --regexp='_bg'
wrt-extra-tests-w3c --output=text --regexp='_bh'
Change-Id: I70cec6d1a4af2cc2f0dff7beaf34e3233c76ffbf
LogError("Failed to unzip for widget");
result = ConfigureResult::Failed_DrmError;
}
+ Catch(Exceptions::MissingConfig)
+ {
+ LogError("Failed to localize config.xml");
+ result = ConfigureResult::Failed_InvalidConfig;
+ }
return result;
}
}
}
+ if(!DPL::Utils::Path(configFile).Exists())
+ {
+ ThrowMsg(Exceptions::MissingConfig, "Config file not exists");
+ }
+
parser.Parse(configFile,
ElementParserPtr(
new RootParser<WidgetParser>(configInfo,
DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorPackageInvalid)
DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorPackageInvalid)
DECLARE_JOB_EXCEPTION(Base, RDSDeltaFailure, ErrorPackageInvalid)
+DECLARE_JOB_EXCEPTION(Base, MissingConfig, ErrorPackageInvalid)
DECLARE_JOB_EXCEPTION(Base, PackageLowerVersion, ErrorPackageLowerVersion)