exception: add errno for internal errors
Assign errnos for InvalidEnumString and UnpackPropertyError.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1ca283050a95846f9409554696880fc043570edf
diff --git a/src/exception.cpp b/src/exception.cpp
index 641659e..640454a 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -131,6 +131,11 @@
return errWhat;
}
+int InvalidEnumString::get_errno() const noexcept
+{
+ return EINVAL;
+}
+
UnpackPropertyError::UnpackPropertyError(std::string_view propertyName,
std::string_view reason) :
propertyName(propertyName),
@@ -152,6 +157,11 @@
return errWhat;
}
+int UnpackPropertyError::get_errno() const noexcept
+{
+ return EINVAL;
+}
+
} // namespace exception
} // namespace sdbusplus