[Issue] Unchecked condition during setting widgets name.
[Bug] Prevent: 22806
[Cause] N/A
[Solution] Checked condition, throw exception if widget not installed
[Verification] Build commons. Run tests.
Change-Id: I24f7a1960d7fb0dad4b8a024c797b28229c447bc
using namespace DPL::DB::ORM;
wrt::ScopedTransaction transaction(&WrtDatabase::interface());
- isWidgetInstalled(getHandle());
+ if (!isWidgetInstalled(getHandle())) {
+ ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,
+ "Cannot find widget. Handle: " << getHandle());
+ }
wrt::WidgetInfo::Row row;
row.Set_pkgname(pkgName);