compile with -g If you use ant, set debug="on" in the javac task. Also, don't compile with -O (set optimize="off").
- Brett -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 30 November 2001 1:08 PM To: Struts Users Mailing List Subject: Getting line number in stacktrace Hi I want to get a little more info when exceptions are thrown in my servlets. Here is an example of the output I am getting at the moment, TopAction.performAction() exception occured executing prepared statement. java.sql.SQLException: ERROR: parser: parse error at or near "" at org.postgresql.Connection.ExecSQL(Connection.java:533) at org.postgresql.jdbc2.Statement.execute(Statement.java:294) at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:78) at org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatemen t.java:122) at jp.co.claire.ereal.TopAction.addMessageToDataBase(Unknown Source) at jp.co.claire.ereal.TopAction.perform(Unknown Source) at org.apache.struts.action.ActionServlet.processActionPerform(ActionSer vlet.java:1786) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:158 5) I want to get the line number that the exception occured in addMessageToDataBase() instead of getting the message "Unknown Source". How can I get the line number printed there like the rest of the stacktrace. Regards Antony -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

