|
|
|
|||||
|
Mapping Exception
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. |
|
|||||
|
Hi,
I'm also interested by this. We have a lot of slices already defined without exception (ok, that's bad). Actually, clients catch UnknownException (ok, that's worst). I would like to introduce a new exception hierarchy without modifying the slices, by throwing RuntimeException. Is it possible? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Which language mapping(s) do you use? | marc | Comments | 12 | 05-31-2006 06:19 AM |
| Dictionary mapping in cpp | DeepDiver | Comments | 1 | 04-07-2005 08:06 AM |
| C mapping | colding | Comments | 4 | 03-31-2005 04:48 AM |
| Dummy c# mapping question | stephan | Help Center | 5 | 02-27-2005 10:49 PM |
| OR mapping questions | stephan | Help Center | 2 | 02-04-2005 03:42 PM |