Refine Exceptions

Begin by declaring one exception class per logical subsystem to HomogenizeExceptions. As you gather more information about particular categories of exceptions that your callers might want to catch, then add subclasses and throw those exceptions instead. For example, from the standard Java libraries, I would create IOException first and then add subclasses as refinements. -- MartinPool

  java.lang.Object

     |

     +--java.lang.Throwable

          |

          +--java.lang.Exception

               |

               +--java.io.IOException

Direct Known Subclasses:

      ChangedCharSetException??, CharConversionException??, EOFException, FileNotFoundException??,

      InterruptedIOException, MalformedURLException, ObjectStreamException??, ProtocolException??, RemoteException?,

      SocketException??, SyncFailedException??, UnknownHostException??, UnknownServiceException??,

      UnsupportedEncodingException??, UTFDataFormatException, ZipException?? 


CategoryException | CategoryJava


EditText of this page (last edited June 11, 2005)
FindPage by browsing or searching

This page mirrored in JavaIdioms as of October 22, 2005