Commit 895dfa0f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Improved error message.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3341 b35dd754-fafc-0310-a699-88a17e54d16e
parent 302a2622
...@@ -340,12 +340,14 @@ public class RosterItemProvider { ...@@ -340,12 +340,14 @@ public class RosterItemProvider {
private void insertGroups(long rosterID, Iterator<String> iter, Connection con) throws SQLException private void insertGroups(long rosterID, Iterator<String> iter, Connection con) throws SQLException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
String groupName = null;
try { try {
pstmt = con.prepareStatement(CREATE_ROSTER_ITEM_GROUPS); pstmt = con.prepareStatement(CREATE_ROSTER_ITEM_GROUPS);
pstmt.setLong(1, rosterID); pstmt.setLong(1, rosterID);
for (int i = 0; iter.hasNext(); i++) { for (int i = 0; iter.hasNext(); i++) {
pstmt.setInt(2, i); pstmt.setInt(2, i);
pstmt.setString(3, iter.next()); groupName = iter.next();
pstmt.setString(3, groupName);
try { try {
pstmt.executeUpdate(); pstmt.executeUpdate();
} }
...@@ -361,7 +363,7 @@ public class RosterItemProvider { ...@@ -361,7 +363,7 @@ public class RosterItemProvider {
} }
} }
catch (Exception e) { catch (Exception e) {
Log.error(e); Log.error("Error inserting group: " + groupName + " for rosterID: " + rosterID, e);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment