Errors and the introspection format

Havoc Pennington hp at
Sun Feb 19 10:25:34 PST 2006

On Sun, 2006-02-19 at 13:45 +0000, Matthew Johnson wrote:
> On Sun, 19 Feb 2006, Thiago Macieira wrote:
> > Daniel P. Berrange wrote:
> >> So
> >> going along a similar line, if a method does not provide a list of
> >> exceptions, it doesn't mean that it won't throw exceptions, just that
> >> it is not providing hints about the exceptions thrown.
> >
> > Further along that line, would it make sense to have an annotation meaning
> > "this doesn't throw anything, nor ever will?"
> >
> aside from the normal 'bus communications failure' and 'unknown service'
> etc errors.

And the equivalent of Java's various runtime exceptions - out of memory,
IllegalArgumentException, assertion failures.

To put exceptions in the type checking, you need the equivalent of
unchecked exceptions, and only put the equivalent of checked exceptions
in the method signature. Yet another reason to just skip this
complexity. Java programmers can't even get right unchecked vs. checked
most of the time, let alone all the Python and C++ programmers designing
dbus APIs.


More information about the dbus mailing list