Add btd_error_failed()

This is a special error type. It has a more general meaning and allows you
to add a string to the error.
diff --git a/src/error.c b/src/error.c
index 013de96..3a78628 100644
--- a/src/error.c
+++ b/src/error.c
@@ -114,3 +114,9 @@
 	return g_dbus_create_error(msg, ERROR_INTERFACE ".NoSuchAdapter",
 					"No such adapter");
 }
+
+DBusMessage *btd_error_failed(DBusMessage *msg, const char *str)
+{
+	return g_dbus_create_error(msg, ERROR_INTERFACE
+					".Failed", "%s", str);
+}
diff --git a/src/error.h b/src/error.h
index a4e32fe..faaef0a 100644
--- a/src/error.h
+++ b/src/error.h
@@ -41,3 +41,4 @@
 DBusMessage *btd_error_does_not_exist(DBusMessage *msg);
 DBusMessage *btd_error_not_authorized(DBusMessage *msg);
 DBusMessage *btd_error_no_such_adapter(DBusMessage *msg);
+DBusMessage *btd_error_failed(DBusMessage *msg, const char *str);