SdbusException

class SdbusException(val name: String, val errorMessage: String = "") : Exception

Exception type representing a D-Bus or sdbus-kotlin error.

Thrown by virtually all sdbus-kotlin operations on failure, including when a remote method returns a D-Bus error reply. The name carries the D-Bus error name (e.g. org.freedesktop.DBus.Error.UnknownMethod), which callers can match against to handle specific error conditions.

The inherited message is deterministically derived from the two properties as "$name: $errorMessage"; errorMessage alone carries the human-readable detail without the D-Bus error name prefix.

Constructors

Link copied to clipboard
constructor(name: String, errorMessage: String = "")

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

Human-readable detail describing the error

Link copied to clipboard
expect open val message: String?
Link copied to clipboard

The D-Bus error name