Errors and the introspection format

Matthew Johnson dbus at
Mon Feb 20 01:41:46 PST 2006

On Mon, 20 Feb 2006, Havoc Pennington wrote:

> On Sun, 2006-02-19 at 19:30 +0000, Matthew Johnson wrote:
>> OK, that makes sense and I will stick to unchecked exceptions (or
>> "Optionally checked" exceptions). Can we please have an annotation
>> listing non-standard exceptions which can be thrown though
> I think that's worth discussing.

Cool, this is what I was originally wanting.

> We need a list of just:
>  <error name=""/>
> This would be information of use only to code generators, which would
> create an empty class or something like:
> package;
> class Bar extends WhateverException {
> }

This would be great.

> If a binding saw the same error name listed in two XML files, it would
> only generate a single class. This implies that we probably want to
> avoid having any info about an error other than its name (since said
> info could be different in different XML files and create a problem).

Do errors have other information about them? (do they always pass
strings? or can they take other parameters?) This is no different to
having the same interface defined in two different files...

> Other thoughts?
It would be nice for API writers to be able to give hints on which
methods will throw them. If we only want the names I can pull them out
of annotations on methods as easily as a global annotation / error tag.


Matthew Johnson

More information about the dbus mailing list