@@ -, +, @@ exceptions - Apply the exception and unit tests patches - Run: $ kshell k$ prove t/db_dependent/Koha/Object.t - Apply this patch - Run: k$ prove t/db_dependent/Koha/Object.t - Sign off :-D --- Koha/Object.pm | 7 +++++++ 1 file changed, 7 insertions(+) --- a/Koha/Object.pm +++ a/Koha/Object.pm @@ -143,6 +143,13 @@ sub store { duplicate_id => $+{key} ); } + elsif( $_->{msg} =~ /Incorrect (?\w+) value: '(?.*)' for column '(?\w+)'/ ) { + Koha::Exceptions::Object::BadValue->throw( + type => $+{type}, + value => $+{value}, + property => $+{property} + ); + } } # Catch-all for foreign key breakages. It will help find other use cases $_->rethrow(); --