Hi,
it would be nice to have the possibility to specify exceptions that
represent general runtime errors at object implementation level that,
in Java, would be derived from java.lang.RuntimeException.
Consider the following:
module sample {
// marked somehow to derive from
// java.lang.RuntimeException, unchecked keyword ??
exception SystemError {
string message;
}
exception OutOfMemoryError extends SystemError {
}
interface RemoteService {
void doSomething(); // no throws clause for SystemError
}
}
Two benefits: first you don't have the add "throw SystemError" to all
the operations of an interface; second, the client is not aware of
implementation details in the normal case (it is aware only of
"logic" errors).
Regards,
Guido.

Reply With Quote