diff options
Diffstat (limited to 'qerror.c')
| -rw-r--r-- | qerror.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qerror.c b/qerror.c index 3d179c87ea..f55d435d11 100644 --- a/qerror.c +++ b/qerror.c @@ -48,6 +48,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Could not add client", }, { + .error_fmt = QERR_AMBIGUOUS_PATH, + .desc = "Path '%(path)' does not uniquely identify a %(object)" + }, + { .error_fmt = QERR_BAD_BUS_FOR_DEVICE, .desc = "Device '%(device)' can't go on a %(bad_bus_type) bus", }, @@ -568,6 +572,14 @@ void qerror_report_err(Error *err) } } +void assert_no_error(Error *err) +{ + if (err) { + qerror_report_err(err); + abort(); + } +} + /** * qobject_to_qerror(): Convert a QObject into a QError */ |