Bug 22001: Errors are no longer logged by default (!)
This is one of the biggest part we will have to deal with when we will switch to DBIC handler for UI as well. The DBI errors will not be logged if we do not deal with them correctly. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
ddbe2753ba
commit
c800ef7e59
1 changed files with 3 additions and 11 deletions
|
@ -579,7 +579,7 @@ subtest 'Return same values as DBIx::Class' => sub {
|
|||
|
||||
subtest 'Koha::Objects->delete' => sub {
|
||||
|
||||
plan tests => 9;
|
||||
plan tests => 7;
|
||||
|
||||
my ( $r_us, $e_us, $r_them, $e_them );
|
||||
|
||||
|
@ -687,11 +687,7 @@ subtest 'Return same values as DBIx::Class' => sub {
|
|||
}
|
||||
);
|
||||
|
||||
warning_like {
|
||||
try { $r_us = $patrons->delete; } catch { $e_us = $_ };
|
||||
}
|
||||
qr{DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails},
|
||||
"Foreign key constraint DBI error should be logged";
|
||||
try { $r_us = $patrons->delete; } catch { $e_us = $_ };
|
||||
my $not_deleted_us = $patron_1->in_storage + $patron_2->in_storage + $patron_3->in_storage;
|
||||
|
||||
$patron_1 = $builder->build_object({ class => 'Koha::Patrons' });
|
||||
|
@ -717,11 +713,7 @@ subtest 'Return same values as DBIx::Class' => sub {
|
|||
}
|
||||
);
|
||||
|
||||
warning_like {
|
||||
try { $r_them = $patrons->delete; } catch { $e_them = $_ };
|
||||
}
|
||||
qr{DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails},
|
||||
"Foreign key constraint DBI error should be logged";
|
||||
try { $r_them = $patrons->delete; } catch { $e_them = $_ };
|
||||
|
||||
my $not_deleted_them = $patron_1->in_storage + $patron_2->in_storage + $patron_3->in_storage;
|
||||
ok(
|
||||
|
|
Loading…
Reference in a new issue