}
}
catch (IOException e)
{
exc = e;
throw new BackupException(e);
}
catch (SQLException e)
{
exc = e;
throw new BackupException("SQL Exception: " + ExceptionManagementHelper.getFullSQLExceptionMessage(e), e);
}
finally
{
if (jdbcConn != null)
{
try
{
jdbcConn.close();
}
catch (SQLException e)
{
if (exc != null)
{
LOG.error("Can't close connection", e);
throw new BackupException(exc);
}
else
{
throw new BackupException(e);
}
}
}
try
{
if (contentWriter != null)
{
contentWriter.close();
}
if (contentLenWriter != null)
{
contentLenWriter.close();
}
}
catch (IOException e)
{
if (exc != null)
{
LOG.error("Can't close zip", e);
throw new BackupException(exc);
}
else
{
throw new BackupException(e);
}
}
}
}