12 #ifndef DBUSCXX_ERROR_H
13 #define DBUSCXX_ERROR_H
35 class Error :
public std::exception {
47 const char*
what()
const noexcept;
49 std::string
name()
const;
59 #define DBUSCXX_ERROR( CPPTYPE, DBUS_ERROR_CODE ) \
60 class CPPTYPE : public Error { \
62 CPPTYPE( const char* message = nullptr ) \
63 : Error( DBUS_ERROR_CODE, message ) {} \
64 CPPTYPE( std::string message ) \
65 : Error( DBUS_ERROR_CODE, message ) {} \
406 DBUSCXX_ERROR( ErrorUnexpectedResponse,
"dbuscxx.Error.UnexpectedResponse" );
ErrorBadVariantCast(const char *message=nullptr)
Definition: error.h:428
ErrorIncorrectDispatchThread(const char *message=nullptr)
Definition: error.h:410
An invalid message was tried to be parsed.
Definition: error.h:444
ErrorInvalidMessage(const char *message=nullptr)
Definition: error.h:446
ErrorMessageNestedTooDeep(const char *message=nullptr)
Definition: error.h:452
ErrorRemoteException(const char *message=nullptr)
Definition: error.h:416
We were unable to parse(something is unimplemented?)
Definition: error.h:435
ErrorUnableToParse(const char *message=nullptr)
Definition: error.h:437
ErrorUnknown(const char *message=nullptr)
Definition: error.h:422
Base class of a hierarchy of error objects thrown when exceptional conditions occur.
Definition: error.h:35
std::string name() const
Definition: error.cpp:39
std::string m_name
Definition: error.h:54
Error()
Definition: error.cpp:13
const char * what() const noexcept
Definition: error.cpp:47
std::string message() const
Definition: error.cpp:43
std::string m_message
Definition: error.h:55
~Error() noexcept
Definition: error.cpp:36
#define DBUSCXX_ERROR_FAILED
A generic error; "something went wrong" - see the error message for more.
Definition: dbus-error.h:17
#define DBUSCXX_ERROR_NOT_SUPPORTED
Requested operation isn't supported (like ENOSYS on UNIX).
Definition: dbus-error.h:31
#define DBUSCXX_ERROR_FILE_EXISTS
Existing file and the operation you're using does not silently overwrite.
Definition: dbus-error.h:57
#define DBUSCXX_ERROR_SERVICE_UNKNOWN
The bus doesn't know how to launch a service to supply the bus name you wanted.
Definition: dbus-error.h:21
#define DBUSCXX_ERROR_NO_SERVER
Unable to connect to server (probably caused by ECONNREFUSED on a socket).
Definition: dbus-error.h:39
#define DBUSCXX_ERROR_FILE_NOT_FOUND
Missing file.
Definition: dbus-error.h:55
#define DBUSCXX_ERROR_BAD_ADDRESS
A D-Bus bus address was malformed.
Definition: dbus-error.h:29
#define DBUSCXX_ERROR_IO_ERROR
Something went wrong reading or writing to a socket, for example.
Definition: dbus-error.h:27
#define DBUSCXX_ERROR_DISCONNECTED
The connection is disconnected and you're trying to use it.
Definition: dbus-error.h:51
#define DBUSCXX_ERROR_UNKNOWN_INTERFACE
Interface you invoked a method on isn't known by the object.
Definition: dbus-error.h:63
#define DBUSCXX_ERROR_TIMED_OUT
Certain timeout errors, e.g.
Definition: dbus-error.h:72
#define DBUSCXX_ERROR_NO_NETWORK
No network access (probably ENETUNREACH on a socket).
Definition: dbus-error.h:47
#define DBUSCXX_ERROR_PROPERTY_READ_ONLY
Property you tried to set is read-only.
Definition: dbus-error.h:67
#define DBUSCXX_ERROR_INVALID_ARGS
Invalid arguments passed to a method call.
Definition: dbus-error.h:53
#define DBUSCXX_ERROR_SPAWN_FAILED
While starting a new process, something went wrong.
Definition: dbus-error.h:86
#define DBUSCXX_ERROR_ADDRESS_IN_USE
Can't bind a socket since its address is in use (i.e.
Definition: dbus-error.h:49
#define DBUSCXX_ERROR_MATCH_RULE_INVALID
The match rule isn't syntactically valid.
Definition: dbus-error.h:76
#define DBUSCXX_ERROR_TIMEOUT
Certain timeout errors, possibly ETIMEDOUT on a socket.
Definition: dbus-error.h:45
#define DBUSCXX_ERROR_NAME_HAS_NO_OWNER
The bus name you referenced doesn't exist (i.e.
Definition: dbus-error.h:23
#define DBUSCXX_ERROR_INVALID_FILE_CONTENT
A file contains invalid syntax or is otherwise broken.
Definition: dbus-error.h:106
#define DBUSCXX_ERROR_UNIX_PROCESS_ID_UNKNOWN
Tried to get a UNIX process ID and it wasn't available.
Definition: dbus-error.h:102
#define DBUSCXX_ERROR_SPAWN_CHILD_EXITED
While starting a new process, the child exited with a status code.
Definition: dbus-error.h:82
#define DBUSCXX_ERROR_LIMITS_EXCEEDED
Some limited resource is exhausted.
Definition: dbus-error.h:33
#define DBUSCXX_ERROR_MATCH_RULE_NOT_FOUND
Tried to remove or modify a match rule that didn't exist.
Definition: dbus-error.h:74
#define DBUSCXX_ERROR_UNKNOWN_PROPERTY
Property you tried to access isn't known by the object.
Definition: dbus-error.h:65
#define DBUSCXX_ERROR_NO_MEMORY
There was not enough memory to complete an operation.
Definition: dbus-error.h:19
#define DBUSCXX_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN
Asked for SELinux security context and it wasn't available.
Definition: dbus-error.h:108
#define DBUSCXX_ERROR_SPAWN_EXEC_FAILED
While starting a new process, the exec() call failed.
Definition: dbus-error.h:78
#define DBUSCXX_ERROR_NO_REPLY
No reply to a message expecting one, usually means a timeout occurred.
Definition: dbus-error.h:25
#define DBUSCXX_ERROR_INVALID_SIGNATURE
A type signature is not valid.
Definition: dbus-error.h:104
#define DBUSCXX_ERROR_UNKNOWN_METHOD
Method name you invoked isn't known by the object you invoked it on.
Definition: dbus-error.h:59
#define DBUSCXX_ERROR_UNKNOWN_OBJECT
Object you invoked a method on isn't known.
Definition: dbus-error.h:61
#define DBUSCXX_ERROR_ACCESS_DENIED
Security restrictions don't allow doing what you're trying to do.
Definition: dbus-error.h:35
#define DBUSCXX_ERROR_SPAWN_FORK_FAILED
While starting a new process, the fork() call failed.
Definition: dbus-error.h:80
#define DBUSCXX_ERROR_AUTH_FAILED
Authentication didn't work.
Definition: dbus-error.h:37
#define DBUSCXX_ERROR_SPAWN_CHILD_SIGNALED
While starting a new process, the child exited on a signal.
Definition: dbus-error.h:84
Global DBus namespace, where everything happens.
Definition: callmessage.cpp:18
DBUSCXX_ERROR(ErrorFailed, DBUSCXX_ERROR_FAILED)