mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6391 from catharsisjelly/3.4-improving-csvbulk-error-message
Altering error message to show the exception
This commit is contained in:
commit
61201edf81
@ -81,7 +81,11 @@ class CsvBulkLoader extends BulkLoader {
|
|||||||
@unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
print "Failed to parse {$last}\n";
|
$failedMessage = sprintf("Failed to parse %s", $last);
|
||||||
|
if (Director::isDev()) {
|
||||||
|
$failedMessage = sprintf($failedMessage . " because %s", $e->getMessage());
|
||||||
|
}
|
||||||
|
print $failedMessage . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user