===================================================================
@@ -93,6 +93,10 @@ static const QErrorStringTable qerror_ta
.desc = "Device '%(device)' not found",
},
{
+ .error_fmt = QERR_DEVICE_NOT_INSERTED,
+ .desc = "Device '%(device)' has not been inserted",
+ },
+ {
.error_fmt = QERR_DEVICE_NOT_REMOVABLE,
.desc = "Device '%(device)' is not removable",
},
@@ -161,6 +165,10 @@ static const QErrorStringTable qerror_ta
.desc = "Could not open '%(filename)'",
},
{
+ .error_fmt = QERR_REOPEN_FILE_FAILED,
+ .desc = "Could not reopen '%(filename)'",
+ },
+ {
.error_fmt = QERR_PROPERTY_NOT_FOUND,
.desc = "Property '%(device).%(property)' not found",
},
===================================================================
@@ -84,6 +84,9 @@ QError *qobject_to_qerror(const QObject
#define QERR_DEVICE_NOT_FOUND \
"{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
+#define QERR_DEVICE_NOT_INSERTED \
+ "{ 'class': 'DeviceNotInserted', 'data': { 'device': %s } }"
+
#define QERR_DEVICE_NOT_REMOVABLE \
"{ 'class': 'DeviceNotRemovable', 'data': { 'device': %s } }"
@@ -135,6 +138,9 @@ QError *qobject_to_qerror(const QObject
#define QERR_OPEN_FILE_FAILED \
"{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }"
+#define QERR_REOPEN_FILE_FAILED \
+ "{ 'class': 'ReopenFileFailed', 'data': { 'filename': %s } }"
+
#define QERR_PROPERTY_NOT_FOUND \
"{ 'class': 'PropertyNotFound', 'data': { 'device': %s, 'property': %s } }"
New errors defined for device insertion and file reopen Signed-off-by: Supriya Kannery <supriyak@in.ibm.com> --- qerror.c | 8 ++++++++ qerror.h | 6 ++++++ 2 files changed, 14 insertions(+)