提交 66c21474 编写于 作者: S Serge Rider

#1762 Data (CSV) exporter fix (error handling)


Former-commit-id: 63962ff4
上级 df6fb151
......@@ -148,10 +148,10 @@ public class StreamTransferConsumer implements IDataTransferConsumer<StreamConsu
}
// Export row
processor.exportRow(session, row);
} catch (DBException e) {
throw new DBCException("Error while exporting table row", e);
} catch (IOException e) {
throw new DBCException("IO error", e);
} catch (Throwable e) {
throw new DBCException("Error while exporting table row", e);
}
}
......
......@@ -129,7 +129,7 @@ public class DataExporterCSV extends StreamExporterAbstract {
@Override
public void exportRow(DBCSession session, Object[] row) throws DBException, IOException
{
for (int i = 0; i < row.length; i++) {
for (int i = 0; i < row.length && i < columns.size(); i++) {
DBDAttributeBinding column = columns.get(i);
if (DBUtils.isNullValue(row[i])) {
if (!CommonUtils.isEmpty(nullString)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册