dumpTable(jdbcConn, entry.getKey(), entry.getValue(), storageDir);
}
}
catch (IOException e)
{
throw new BackupException(e);
}
catch (SQLException e)
{
SQLException next = e.getNextException();
String errorTrace = "";
while (next != null)
{
errorTrace += next.getMessage() + "; ";
next = next.getNextException();
}
Throwable cause = e.getCause();
String msg = "SQL Exception: " + errorTrace + (cause != null ? " (Cause: " + cause.getMessage() + ")" : "");
throw new BackupException(msg, e);
}
catch (NamingException e)
{
throw new BackupException(e);
}
finally
{
if (jdbcConn != null)
{
try
{
jdbcConn.close();
}
catch (SQLException e)
{
throw new BackupException(e);
}
}
}
}