December 2002
Intermediate to advanced
288 pages
9h 46m
English
Almost all RMI exceptions extend RemoteException.
This can be very convenient because it makes generic code easier to
write; you can simply catch RemoteException and be
confident that you’ve caught all RMI-related
exceptions. But it can also lead to programmer sloppiness. The
different subclasses of RemoteException have very
different meanings, and treating them generically is often a mistake.
Every RemoteException can be classified using four
major attributes: what code throws it, when it will be thrown, why it
will be thrown, and what this indicates about your application.
Consider the following list, which classifies the nine most common
remote exceptions along these axes.