We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 83be865 + 88994e9 commit 90ddb8dCopy full SHA for 90ddb8d
src/Import.php
@@ -61,9 +61,12 @@ protected function execute_statements( $import_file ) {
61
$converted_statement = mb_convert_encoding( $statement, 'UTF-8', $detected_encoding );
62
echo 'Converted ecoding for statement: ' . $converted_statement . PHP_EOL;
63
$this->driver->query( $converted_statement );
64
+ } else {
65
+ // It's not an encoding issue, so rethrow the exception.
66
+ throw $e;
67
}
68
} catch ( Exception $e ) {
- WP_CLI::warning( 'Could not execute statement: ' . $statement );
69
+ WP_CLI::error( 'Could not execute statement: ' . $statement );
70
echo $e->getMessage();
71
72
0 commit comments