Sorry but i dont have an answer for your question :-( but, While we are on the subject of errors and java, i have in place try and catch tags and also have cferror tags to catch any errors which the try/catch miss. the problem is, is that the other day a server went down and the dsn was un reachable. I cant remember the exact error, but it was a java. something error. The error was displayed as a standard coldfusion error and wasnt picked up by my try/catch or cferror tags and was displayed as a normal coldfusion error, thus showing the dsn for all and sundry to see.
Is there any way of catching these java errors and if so how. cheers jamie > funny you should mention log4j. I received a blog post from a java dev > site mentioning using log4j...who also had this to say > > > <quote src=3D"http://www.codebits.com"> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > I've been using Java for more years than I care to mention but I > never realized that you could catch errors as well as exceptions. So > I've just added one more item to my toolbox. My main() method always > uses this template: > > try { > // do something. > } catch (Error e) { > e.printStackTrace(); > } catch (Exception e) { > e.printStrackTrace(); > } finally { > System.out.println("Done."); > } > Of course I use log4j so that the errors are persisted. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > </quote> > > errors AND exceptions? I thought it was all just "gone bugger-up". If > there is a difference in java, what does that mean for CF, built on > java? how fine tuned can one build error handling in CF - more than just > catching, throwing and re-throwing exceptions? not just for handling but > logging and debugging. > > anyone java people want to comment? > > cheers? > barry.b > > > -----Original Message----- > From: Chris Velevitch [mailto:[EMAIL PROTECTED] > Sent: Friday, 23 April 2004 12:22 PM > To: CFAussie Mailing List > Subject: [cfaussie] Re: Another debugging Question > > On Fri, 23 Apr 2004 11:55:27 +1000, Gavin Cooney=20 > <[EMAIL PROTECTED]> wrote: > > 1. Is there a better way? > > You could try using log4j logger (see=20 > http://www.sys-con.com/coldfusion/article.cfm?id=3D700). That way you > leave=20 > all the logging code in and through the use of an xml file, you control=20 > what parts of the application to log and the level of logging. When=20 > logging is turned off, there is minimal performance degradation from=20 > having the logging code left in. > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > [EMAIL PROTECTED] > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > http://www.mxdu.com/ + 24-25 February, 2004 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
