next if $line =~ /^\s*$/; #skip empty lines
$line = &{$row_callback}($line) if $row_callback;
+
+ next if $line =~ /^\s*$/; #skip empty lines
$parser->parse($line) or do {
$dbh->rollback if $oldAutoCommit;
- return "can't parse: ". $parser->error_input();
+ return "can't parse: ". $parser->error_input() . " " . $parser->error_diag;
};
@columns = $parser->fields();
next if exists( $param->{skiprow} );
if ( $preinsert_callback ) {
- my $error = &{$postinsert_callback}($record, $param);
+ my $error = &{$preinsert_callback}($record, $param);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "preinsert_callback error". ( $line ? " for $line" : '' ).