Dangerous issue, but IMHO that's the way it should be. Any language construct that derails you from your primary path of thinking is more of a derailment than assistance. Tools are more than capable of detecting and warning of alternative paths and lets face it, you're going to need unit tests anyway. Fan also converts checked exceptions into runtime exceptions for the same reason. In a sense, it's staticness taken too far. Someone should short-circuit javac, since checked exceptions really is just a figment of its imagination.
/Casper On 18 Aug., 05:10, Michael Neale <[email protected]> wrote: > What do people think of the scala approach of no checked exceptions - > even checked exceptions are not treated specially by the constructor > (personally, I like it). > > On Aug 18, 12:55 pm, Christian Catchpole <[email protected]> > wrote: > > > No, i just let that go up. I really try to avoid the declare as null > > then set thingy. > > > On Aug 18, 12:03 pm, Casper Bang <[email protected]> wrote: > > > > You neglect to handle the checked exception declared by > > > prepareStatement no? > > > > PreparedStatement stmt = null; > > > try{ > > > stmt = connection.prepareStatement(sql); > > > final ResultSet rs = stmt.executeQuery(); > > > try{ > > > while (rs.next()){ > > > // Stuff... > > > { > > > } > > > finally{ > > > rs.close(); > > > }} > > > > catch(SQLException e){ > > > // Logging...} > > > > finally{ > > > try{ > > > stmt.close(); > > > } > > > catch(SQLException whoTheFuckCares){ > > > }; > > > > } > > > > Really, how many other ways are there to do it I wonder now? (Apart > > > from wrapping certain things, like the last try-catch clause in some > > > general purpose "closer util"?). > > > > /Casper --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
