summaryrefslogtreecommitdiffstats
path: root/network/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'network/error.c')
-rw-r--r--network/error.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/error.c b/network/error.c
index 8c0924d5..50d33bc9 100644
--- a/network/error.c
+++ b/network/error.c
@@ -38,3 +38,17 @@ DBusHandlerResult err_unknown_connection(DBusConnection *conn,
"Unknown connection path"));
}
+DBusHandlerResult err_generic(DBusConnection *conn, DBusMessage *msg,
+ const char *name, const char *str)
+{
+ return send_message_and_unref(conn,
+ dbus_message_new_error(msg, name, str));
+}
+
+DBusHandlerResult err_does_not_exist(DBusConnection *conn, DBusMessage *msg,
+ const char *str)
+{
+ return send_message_and_unref(conn,
+ dbus_message_new_error(msg,
+ NETWORK_ERROR_INTERFACE ".DoesNotExist", str));
+}