You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by an...@claire.co.jp on 2001/11/30 03:07:34 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>