Revision 7eaf45a5
Von Bernd Bleßmann vor mehr als 10 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
5 |
use English qw(-no_match_vars); |
|
5 | 6 |
use List::MoreUtils qw(pairwise any); |
6 | 7 |
|
7 | 8 |
use SL::Helper::Csv; |
... | ... | |
461 | 462 |
|
462 | 463 |
my $ret; |
463 | 464 |
if (!eval { $ret = $object->save(cascade => !!$self->save_with_cascade()); 1 }) { |
464 |
push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $@);
|
|
465 |
push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $EVAL_ERROR);
|
|
465 | 466 |
} elsif ( !$ret ) { |
466 |
push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $entry->{object}->db->error);
|
|
467 |
push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $object->db->error);
|
|
467 | 468 |
} else { |
468 | 469 |
$self->_save_history($object); |
469 | 470 |
$self->controller->num_imported($self->controller->num_imported + 1); |
Auch abrufbar als: Unified diff
CsvImport: Fehler beim Speichern vom richtigem Objekt anzeigen.
Und "use English" (EVAL_ERROR) für bessere Lesbarkeit.