Re: RFC: make JSExn non fatal and caught by Template.java
Brian Alliet <[email protected]>
| Newsgroups | gmane.comp.java.xwt.core |
|---|---|
| Message-ID | <[email protected]> |
On Mar 12, 2004, at 3:20 AM, Tupshin Harper wrote:
>>> Right now, any template that has code that results in a JSExn
>>> effectively kills the application
>> I think that is what we want. If a template application fails the
>> caller should know about it, right?
> don't think think the current behavior is desirable at all.
Oh.. I misunderstood what you meant by "application". I thought you
were talking about the application of an individual template. You are
talking about the application as in ibex as a whole. I agree with you
then. Ibex shouldn't get stuck in an "open but unresponsive state" if
the initial template fails. This is a bug.
> you would want to be able to have the user type in a line of
> javascript, and evaluate it without fear of crashing the app.
Anything that runs as a result of an action by the user (mouse click,
etc) runs its own message queue message. The message queue should be
catching any exceptions thrown by messages and logging them.
Click1 ++= function(v) { throw "Click1 Failed"; }
Works just fine for me. Also, if you are concerned about exceptions
being thrown from a piece of code you can always do this:
try {
foo();
} catch(e) {
ibex.log.error("foo threw: " + e);
}
That being said... I'm sure there are still bugs in Ibex that make it
possible to inadvertently bring the whole thing down. They should be
fixed though :)
-Brian