module OBus_error:sig
..end
To do this, an OCaml exception that maps a D-Bus error should be
registered with OBus_error.Register
.
typename =
OBus_name.error
"org.foo.bar.Error.Failed"
typemessage =
string
exception DBus of name * message
Arguments are:
val ocaml : name
val name : exn -> name
name exn
returns the D-Bus error name under which this
exception is registered. If the exception is not registered,
then ocaml
is returned.val make : name -> message -> exn
make exn message
creates an exception from an error name and
an error message. If the name is not registered, then
DBus(name, message)
is returned.val cast : exn -> name * message
cast exn
returns the D-Bus name and message of the given
exception. If the exception is not registered, (ocaml,
Printexc.to_string exn)
is returned.module type Error =sig
..end
module Register:
Note that the error message will normally be shown to the user so
they must be explicative.
exception Failed of message
org.freedesktop.DBus.Error.Failed
errorexception Invalid_args of message
org.freedesktop.DBus.Error.InvalidArgs
errorexception Unknown_method of message
org.freedesktop.DBus.Error.UnknownMethod
errorexception Unknown_object of message
org.freedesktop.DBus.Error.UnknownObject
errorexception Unknown_interface of message
org.freedesktop.DBus.Error.UnknownInterface
errorexception Unknown_property of message
org.freedesktop.DBus.Error.UnknownProperty
errorexception Property_read_only of message
org.freedesktop.DBus.Error.PropertyReadOnly
errorexception No_memory of message
org.freedesktop.DBus.Error.NoMemory
errorexception No_reply of message