On Tuesday 06 December 2005 08:49, David Johnson wrote:
> You're missing my point.
>
> My point is that the nature of exception propagation means that it's an
> all or nothing affair. If a library uses it (such as kdelibs), then
> every application using that library must also use it or risk not
> catching a thrown exception.


Only if it was designed to leak the exceptions out of the library function
call, isn't that true?

I mean, a library should be able to do whatever it likes with exceptions if it
makes sure to catch them.

In my case, I have a parser syntax checking algorithm and thought that
exceptions would be nice here, since i do the same type of checking in 100
places and every one of them should lead to the same error, and none of the
triws implies any new operators or such things. Just some trivial testing and
I like to generalize it. It's a simple exception and not ever meant to leak
to reach the caller. Instead I want to catch it and provide another interface
for the library user's error checking.

You guys, pro and against, would you have any problems with that? I mean, I
believe I am in control of both ends of the exception mechanism.
--
Jonas Widarsson

tel: +46 271 152 00 - tel: +46 271 121 42 (hemma/home) - gsm: +46 70 539 64 79
MSN: jonas@widarsson.com ICQ: 72016688 jabber: jonas@widarsson.com

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<