mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Altering error message to show the exception
This commit is contained in:
parent
7ca876a4c7
commit
11bc05de96
@ -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