Sorry i forgot to mention this has always been a web mode issue for
me. Hosted is fine

Ive only really had this problem with runtime exceptions (although
after having this problem twice i just catch "Exception"). I first
found it when i had some code like this:

private Widget o;

public Object getO() {}
public void setO(Widget o) {}

public void doSomething() {
  try {
    o.aMethod();
  } catch (NullPointerException ex) {
    System.out.println("caught");
    return;
  }
  System.out.println("Not caught"):
}

with the resulting output:
  Not caught

and when using the debugger i can clearly see its throwing a null.
and if i add something like Window.alert(ex.getCause()); and make it
catch Exception and run it in web mode i get something similar to
NullPointerException (renamed because its JS i assume but practically
the same). Sorry i cant remember exactly what it was called. I cant
possibly the only person thats come across this???



On Oct 15, 1:53 pm, walden <[EMAIL PROTECTED]> wrote:
> Stephen,
>
> When you say "i have to catch it using..." you are giving an
> interpretation of the problem (or rather, your solution) instead of
> the problem itself.  What happens if you write code to catch the exact
> exception thrown?
>
> Walden
>
> On Oct 15, 5:42 am, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > I am finding that often if i throw an exception in the client side
> > then i have to catch it using "catch (Exception ex)" rather than
> > "catch (TheActualExceptionThrown ex)".
>
> > Does anyone else have this issue as i havent seen any posts on the
> > issue and it seems pretty annoying.
>
> > Thanks,
> > Steve- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to