Date: 2004-08-11T06:37:37
   Editor: VadimGritsenko <[EMAIL PROTECTED]>
   Wiki: Cocoon Wiki
   Page: ButterflyManifesto
   URL: http://wiki.apache.org/cocoon/ButterflyManifesto

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -86,9 +86,9 @@
 
 Checked exceptions do more harm than good, so it would be wise to avoid them 
altogether. Design instead a hierarchy of runtime exceptions and, whenever you 
need to catch an exception thrown by a third party library, decide whether you 
can handle it locally. If you cannot, wrap it in a runtime exception and throw 
the latter.
 
-Niclas Hedhman: If everyone follows this rule, then we don't know when there 
are exceptions to catch, no situations you try to recover from, and we will 
have runtime unstable systems. Sorry, I don't buy this argument for a second. 
Programmers need to do there job, not ignore it for the 'time being' as lazy 
developers will definately do otherwise. Perhaps you can get away with this in 
a request/response system like Cocoon, but a general recommendation that 
nothing should throw checked Exception is foolish.
+''Niclas Hedhman'': If everyone follows this rule, then we don't know when 
there are exceptions to catch, no situations you try to recover from, and we 
will have runtime unstable systems. Sorry, I don't buy this argument for a 
second. Programmers need to do there job, not ignore it for the 'time being' as 
lazy developers will definately do otherwise. Perhaps you can get away with 
this in a request/response system like Cocoon, but a general recommendation 
that nothing should throw checked Exception is foolish.
 
-Ugo: I invite everyone to read what others have to say on the subject, then 
make up your mind:
+''Ugo'': I invite everyone to read what others have to say on the subject, 
then make up your mind:
 
  * [http://www.mindview.net/Etc/Discussions/CheckedExceptions]
  * [http://www.artima.com/intv/jdom3.html]
@@ -97,6 +97,10 @@
  * [http://www.artima.com/intv/solid.html]
 
 After this, take a careful look at Cocoon's code base and count how many 
exceptions are swallowed or rethrown as unrelated kind of exceptions (with the 
ensuing mile-long stacktraces). It's not that checked exceptions are bad in 
theory. It's that in practice very few developers deal with them sensibly.
+
+''Vadim'': I'd much prefer to first deal sensibly with what we got, instead of 
making blanket statements "checked exceptions are bad". As a counterexample, 
take a look at !TransformerImpl, lines 3394 and 3418.
+
+ * 
[http://cvs.apache.org/viewcvs.cgi/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java?annotate=1.158]
 
 == Code ==
 

Reply via email to