Re: Re: Parser Size

David Crawshaw <[email protected]> Tue, 22 Apr 2003 18:00:07 +1000
Newsgroups gmane.comp.java.xwt.general
Message-ID <[email protected]>
On Sunday, April 20, 2003, at 10:35  PM, Adam Megacz wrote:
> One thing I'd like to do is have exceptions thrown inside a read trap
> get propagated out to the 'caller' of the read trap, but exceptions
> thrown in a write trap are written into the log and then dropped on
> the floor.

This sounds like a good idea.

> As for how builtin functions (org.xwt.XWT.*) should behave when passed
> invalid arguments, I'm not sure.  The two possibilities are to log an
> error and return null, or else to throw an exception.

Practically, I don't think it matters that much, but an exception would 
be more consistent. It also offers programmers some chance at general 
rollback if they're doing a ton of things inside a single try {} block.

>   throw "IOException:DNSException:HostNotFound - couldn't resolve 
> www.yourmom.com"

This is probably the best compromise, but we should have some 
documentation somewhere about the exceptions that can be thrown, where 
they can be thrown, and what can be parsed out of them.

d


_______________________________________________
http://lists.xwt.org/listinfo/dev