ResourceNotFound: Add RESOURCE field to exception
Change Id1e07b42bc3fb13ff45284342976b94734370402 is adding a RESOURCE
field to the phosphor-logging metadata for Common.ResourceNotFound.
Leverage it here as well.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I63598474c82aa8d704c034465ad1735ff5146a77
diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index 19e4673..a9ff7cc 100644
--- a/src/network_manager.cpp
+++ b/src/network_manager.cpp
@@ -190,7 +190,9 @@
{
if (!hasInterface(interfaceName))
{
- elog<ResourceNotFound>();
+ using ResourceErr =
+ phosphor::logging::xyz::openbmc_project::Common::ResourceNotFound;
+ elog<ResourceNotFound>(ResourceErr::RESOURCE(interfaceName.c_str()));
}
return interfaces[interfaceName]->createVLAN(id);