Thx for your replies, guys!
By following the link to Orcale's docs I learned that the *throws *statement
belongs to the public interface: These exceptions are as much a part of
that method's programming interface as its parameters and return value. If
this was true, the implementation would
The docs talk about checked exceptions. These are exceptions that extend
Exception and not RuntimeException. A checked exception is part of the API
as you can not throw a checked exception without defining a throws clause
on a method. Also you must use a try catch block when you want to call a
Using GWT 2.5.0 and Eclipse Juno I'm declaring a *throws
RuntimeException*inside a method signature.
Thought that this should force implementing methods to declare this as well
but Eclipse doesn't complain on not doing so.
Is this by design (of Java and/or GWT)? If so: what's the whole purpose
Furthermore, even declaring different throws statements in the interface,
the async one and the implementing class doesn't even cause any warning:
all by design?
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To view this discussion on
Quick guess: maybe the throws declaration only forces the client to handle
the exception?
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To view this discussion on the web visit
Quick guess: maybe the throws declaration only forces the client to handle
the exception?
However it doesn't make sense to throw different exceptions inside the
implementation (so they should be bound to the throws decalration in the
interface), does it?
--
You received this message because
When you declare an exception (checked or unchecked) in an interface it
means that anyone who uses this interface should be prepared to handle this
exception but it does not mean that every implementation of that interface
must throw this exception. Maybe an implementation exists that simply do
This is specified by Java and is by design. The rationale is here:
http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
-Abraham
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To view this discussion on the web visit