public sealed class DBusException : Exception An error reply from a D-Bus peer, or a call that could not complete.
Remarks
Branch on DBusException.ErrorName, such as org.freedesktop.DBus.Error.ServiceUnknown or a service's own org.freedesktop.UDisks2.Error.NotAuthorized. Exception.Message is the peer's text, for logs; it may contain paths or other details and is not meant for display. A closed connection reports DBusException.Disconnected. A service handler throws this exception to reply with an error.
Constructors
DBusException
public DBusException(string errorName, string message) Creates an error with a D-Bus error name, such as org.example.Error.NotFound, and a message.
Exceptions
ArgumentExceptionerrorNameis not a valid D-Bus error name.
DBusException
public DBusException(string errorName, string message, Exception? innerException) Creates an error with a D-Bus error name, a message and the exception that caused it.
Exceptions
ArgumentExceptionerrorNameis not a valid D-Bus error name.
Fields
AccessDenied
public const string AccessDenied = "org.freedesktop.DBus.Error.AccessDenied" The error name of a denied request.
Disconnected
public const string Disconnected = "org.freedesktop.DBus.Error.Disconnected" The error name of a closed or failed connection.
Failed
public const string Failed = "org.freedesktop.DBus.Error.Failed" The error name of a generic failure.
InvalidArgs
public const string InvalidArgs = "org.freedesktop.DBus.Error.InvalidArgs" The error name of arguments that do not match a method's signature.
LimitsExceeded
public const string LimitsExceeded = "org.freedesktop.DBus.Error.LimitsExceeded" The error name of a request over a limit, such as a call to an exported object that already has as many calls as DBusObject.MaxConcurrentCalls allows running and waiting.
NoReply
public const string NoReply = "org.freedesktop.DBus.Error.NoReply" The error name of a call that got no reply in time: the call's DBusMethodCall.Timeout passed, or the bus gave up waiting for the service.
PropertyReadOnly
public const string PropertyReadOnly = "org.freedesktop.DBus.Error.PropertyReadOnly" The error name of a write to a read-only property.
UnknownInterface
public const string UnknownInterface = "org.freedesktop.DBus.Error.UnknownInterface" The error name of an interface an object does not implement.
UnknownMethod
public const string UnknownMethod = "org.freedesktop.DBus.Error.UnknownMethod" The error name of a method an object does not implement.
UnknownProperty
public const string UnknownProperty = "org.freedesktop.DBus.Error.UnknownProperty" The error name of a property an object does not have.
Properties
ErrorName
public string ErrorName { get; } The D-Bus error name.