1SD_BUS_REPLY_METHOD_ERROR(3)sd_bus_reply_method_erroSrD_BUS_REPLY_METHOD_ERROR(3)
2
3
4

NAME

6       sd_bus_reply_method_error, sd_bus_reply_method_errorf,
7       sd_bus_reply_method_errorfv, sd_bus_reply_method_errno,
8       sd_bus_reply_method_errnof, sd_bus_reply_method_errnofv - Reply with an
9       error to a D-Bus method call
10

SYNOPSIS

12       #include <systemd/sd-bus.h>
13
14       int sd_bus_reply_method_error(sd_bus_message *call,
15                                     const sd_bus_error *e);
16
17       int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name,
18                                      const char *format, ...);
19
20       int sd_bus_reply_method_errorfv(sd_bus_message *call, const char *name,
21                                       const char *format, va_list ap);
22
23       int sd_bus_reply_method_errno(sd_bus_message *call, int error,
24                                     const sd_bus_error *p);
25
26       int sd_bus_reply_method_errnof(sd_bus_message *call, int error,
27                                      const char *format, ...);
28
29       int sd_bus_reply_method_errnofv(sd_bus_message *call, int error,
30                                       const char *format, va_list ap);
31

DESCRIPTION

33       The sd_bus_reply_method_error() function sends an error reply to the
34       call message. The error structure e specifies the error to send, and is
35       used as described in sd_bus_message_new_method_error(3). If no reply is
36       expected to call, this function succeeds without sending a reply.
37
38       The sd_bus_reply_method_errorf() is to sd_bus_reply_method_error() what
39       sd_bus_message_new_method_errorf() is to
40       sd_bus_message_new_method_error().
41
42       The sd_bus_reply_method_errno() is to sd_bus_reply_method_error() what
43       sd_bus_message_new_method_errno() is to
44       sd_bus_message_new_method_error().
45
46       The sd_bus_reply_method_errnof() is to sd_bus_reply_method_error() what
47       sd_bus_message_new_method_errnof() is to
48       sd_bus_message_new_method_error().
49

RETURN VALUE

51       This function returns a non-negative integer if the error reply was
52       successfully sent or if call does not expect a reply. On failure, it
53       returns a negative errno-style error code.
54
55   Errors
56       Returned errors may indicate the following problems:
57
58       -EINVAL
59           The input parameter call is NULL.
60
61           Message call is not a method call message.
62
63           Message call is not attached to a bus.
64
65           The error parameter e to sd_bus_reply_method_error() is not set,
66           see sd_bus_error_is_set(3).
67
68       -EPERM
69           Message call has been sealed.
70
71       -ENOTCONN
72           The bus to which message call is attached is not connected.
73
74       -ENOMEM
75           Memory allocation failed.
76
77       In addition, any error returned by sd_bus_send(1) may be returned.
78

NOTES

80       These APIs are implemented as a shared library, which can be compiled
81       and linked to with the libsystemd pkg-config(1) file.
82

SEE ALSO

84       systemd(1), sd-bus(3), sd_bus_message_new_method_error(3)
85
86
87
88systemd 251                                       SD_BUS_REPLY_METHOD_ERROR(3)
Impressum