DBusError
Description:
[ CCode ( cprefix = "G_DBUS_ERROR_" , type_id = "g_dbus_error_get_type ()" ) ]
[ Version ( since = "2.26" ) ]
public errordomain DBusError
[ Version ( since = "2.26" ) ]
public errordomain DBusError
Error codes for the g_dbus_error error domain.
Namespace: GLib
Package: gio-2.0
Content:
Error codes:
- ACCESS_DENIED - Security restrictions don't allow doing what you're trying to do.
- ADDRESS_IN_USE - Can't bind a socket since its address is in use (i.
- ADT_AUDIT_DATA_UNKNOWN - Asked for ADT audit data and it wasn't available.
- AUTH_FAILED - Authentication didn't work.
- BAD_ADDRESS - A D-Bus bus address was malformed.
- DISCONNECTED - The connection is disconnected and you're trying to use it.
- FAILED - A generic error; "something went wrong" - see the error message for more.
- FILE_EXISTS - Existing file and the operation you're using does not silently overwrite.
- FILE_NOT_FOUND - Missing file.
- INVALID_ARGS - Invalid arguments passed to a method call.
- INVALID_FILE_CONTENT - A file contains invalid syntax or is otherwise broken.
- INVALID_SIGNATURE - A type signature is not valid.
- IO_ERROR - Something went wrong reading or writing to a socket, for example.
- LIMITS_EXCEEDED - Some limited resource is exhausted.
- MATCH_RULE_INVALID - The match rule isn't syntactically valid.
- MATCH_RULE_NOT_FOUND - Tried to remove or modify a match rule that didn't exist.
- NAME_HAS_NO_OWNER - The bus name you referenced doesn't exist (i.
- NOT_SUPPORTED - Requested operation isn't supported (like ENOSYS on UNIX).
- NO_MEMORY - There was not enough memory to complete an operation.
- NO_NETWORK - No network access ( probably ENETUNREACH on a socket).
- NO_REPLY - No reply to a message expecting one, usually means a timeout occurred.
- NO_SERVER - Unable to connect to server (probably caused by ECONNREFUSED on a socket).
- OBJECT_PATH_IN_USE - There's already an object with the requested object path.
- PROPERTY_READ_ONLY - Property you tried to set is read-only.
- SELINUX_SECURITY_CONTEXT_UNKNOWN - Asked for SELinux security context and it wasn't available.
- SERVICE_UNKNOWN - The bus doesn't know how to launch a service to supply the bus name you wanted.
- SPAWN_CHILD_EXITED - While starting a new process, the child exited with a status code.
- SPAWN_CHILD_SIGNALED - While starting a new process, the child exited on a signal.
- SPAWN_CONFIG_INVALID - We failed to setup the config parser correctly.
- SPAWN_EXEC_FAILED - While
starting a new process, the
exec
call failed. - SPAWN_FAILED - While starting a new process, something went wrong.
- SPAWN_FILE_INVALID - Service file invalid (Name, User or Exec missing).
- SPAWN_FORK_FAILED - While
starting a new process, the
fork
call failed. - SPAWN_NO_MEMORY - Tried to get a UNIX process ID and it wasn't available.
- SPAWN_PERMISSIONS_INVALID - Permissions are incorrect on the setuid helper.
- SPAWN_SERVICE_INVALID - Bus name was not valid.
- SPAWN_SERVICE_NOT_FOUND - Service file not found in system-services directory.
- SPAWN_SETUP_FAILED - We failed to setup the environment correctly.
- TIMED_OUT - Certain timeout errors, e.
- TIMEOUT - Certain timeout errors, possibly ETIMEDOUT on a socket.
- UNIX_PROCESS_ID_UNKNOWN - Tried to get a UNIX process ID and it wasn't available.
- UNKNOWN_INTERFACE - Interface you invoked a method on isn't known by the object.
- UNKNOWN_METHOD - Method name you invoked isn't known by the object you invoked it on.
- UNKNOWN_OBJECT - Object you invoked a method on isn't known.
- UNKNOWN_PROPERTY - Property you tried to access isn't known by the object.
Static methods:
- public static string encode_gerror (Error error)
Creates a D-Bus error name to use for
error
. - public static string? get_remote_error (Error error)
Gets the D-Bus error name used for
error
, if any. - public static bool is_remote_error (Error error)
Checks if
error
represents an error received via D-Bus from a remote peer. - public static Error new_for_dbus_error (string dbus_error_name, string dbus_error_message)
Creates a Error based on the contents of
dbus_error_name
anddbus_error_message
. - public static Quark quark ()
- public static bool register_error (Quark error_domain, int error_code, string dbus_error_name)
Creates an association to map between
dbus_error_name
and Errors specified byerror_domain
anderror_code
. - public static void register_error_domain (string error_domain_quark_name, size_t quark_volatile, DBusErrorEntry[] entries)
Helper function for associating a Error error domain with D-Bus error names.
- public static void set_dbus_error (string dbus_error_name, string dbus_error_message, string? format, ...) throws DBusError
- public static void set_dbus_error_valist (string dbus_error_name, string dbus_error_message, string? format, va_list var_args) throws DBusError
- public static bool strip_remote_error (Error error)
Looks for extra information in the error message used to recover the D-Bus error name and strips it if found.
- public static bool unregister_error (Quark error_domain, int error_code, string dbus_error_name)
Destroys an association previously set up with register_error.