Errors and the introspection format

Havoc Pennington hp at redhat.com
Fri Feb 17 12:51:45 PST 2006


On Fri, 2006-02-17 at 18:11 +0000, Matthew Johnson wrote:
> So, Java will expose this in the programming API, and everything else will just
> list it as another annotation, this is fine, but the introspection data should
> contain all the API, and this includes error conditions.

The most important part of the API is the semantic documentation of the
method's contract. i.e. what happens when you call the method.

Every language but Java includes "what errors are thrown" in the docs,
rather than the method signature. I like the Java way, but the unchecked
exception way does work fine. There are already a ton of other features
of any given ABI that depend purely on docs and aren't checked by the
compiler. It's not like this is the only one.

If the Java bindings think that dbus method signatures include the
exceptions thrown, and no other bindings think that, it's just going to
cause interoperability problems IMO.

A non-goal of dbus is to be able to round-trip any native type or method
for a given framework. i.e. dbus is deliberately closer to the
intersection of the bindings' type systems, than to the union of them.

Havoc




More information about the dbus mailing list