I'm just guessing here because I don't know how GWT maps native
Javascript "exceptions" into Java. I think your problem might be
related to the fact that you're throwing a string, not an Exception
and you're catching an Exception, not a string.
Do you have control over the script you're trying to include? Can you
modify the throw statement to call into a Java method that throws a
"real" exception? Could you factor the throw statement into a helper
function that gets substituted by a JSNI method when the script is
invoked from a GWT app?
Ian
You may have found a bug in GWT. If GWT can catch thrown strings in
the second case but not in the first case, then I think there's a
problem with the exception mapping between the languages. You might
want to file a bug and, if you do, try to include a really good repro
case.
Ian