[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: IDL language
From:       Havoc Pennington <havoc.pennington () gmail ! com>
Date:       2009-05-12 3:37:34
Message-ID: 2cef5bf40905112037v1477be0eq8e38fde8c5f4ab49 () mail ! gmail ! com
[Download RAW message or body]

Hi,

On Mon, May 11, 2009 at 11:07 AM, Matthew Johnson <dbus@matthew.ath.cx> wrote:
> Havoc's point that there will always be unchecked exceptions which could
> be thrown notwithstanding, some languages might want to make them
> checked exceptions, so we shouldn't lose the information.
>

Even in languages with checked, though, some exceptions should be
checked (those that need handling) and some should not (those that
represent an unhandleable bug). Java uses RuntimeException and Error
for the unhandle-able, though the name (RuntimeException rather than
Bug or the like) has caused so much misuse of it that I think it ended
up breaking checked exceptions in Java and leading to backlash in C#
and many Java APIs like Hibernate.

GLib uses GError for handleable, and just an uncatchable warning
(return_if_fail) for the bugs.

Anyway I think it's important to be clear, if adding a facility to
list exceptions, whether listed exceptions are going to be handle-able
exceptions only (which is what I'd recommend). So "bad args" type
exceptions would not be listed. Also not listed might be say
out-of-memory or disconnected or timeout, which are presumed always
possible. (Though if an app actualiy wanted to deal with timeouts and
disconnection, having those be checked could be useful, presumably
listing them per-method when they can happen for all methods, is not
useful.)

Havoc
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic