From: Gareth R. <g_j...@ya...> - 2006-01-29 21:38:38
|
Hi Radu, I'll see what I can do over the next 2 weeks, and send CVS diffs :-) Does anyone on the list have views as to whether exceptions arising from calling javaclient methods should be checked or unchecked exceptions? Most of the issues that are being caught look rather serious - sufficiently serious that most callers of the code will not want to try to handle them. E.g. if something is serious enough for you to be calling System.exit(1) then it's unlikely that a client will be able to recover ! This suggests that they should be unchecked (i.e. extend RuntimeException). If a caller really wants to then they can catch them, but otherwise they need not be burdened with the extra code. A further argument for unchecked comes from SQLException. One of the (many) criticisms of "java.sql.SQLException" is that most database errors are simply unrecoverable without human intervention, and that there is no point in a caller being forced to catch them. This argument seems to apply to javaclient. Unchecked is best unless someone can think of a compelling reason otherwise. Yours, Gareth Randall ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com |