($ret->{condition}, $ret->{join_free_condition}, my @extra) = $args->{condition}->($cref_args);
- # FIXME sanity check
- carp_unique('A custom condition coderef can return at most 2 conditions: extra return values discarded')
+ # sanity check
+ $self->throw_exception("A custom condition coderef can return at most 2 conditions, but $exception_rel_id returned extra values: @extra")
if @extra;
if (my $jfc = $ret->{join_free_condition}) {
'set from related via coderef cond inflates properly',
;
+throws_ok {
+ local $schema->source('Track')->relationship_info('cd_cref_cond')->{cond} = sub { 1,2,3 };
+ $schema->resultset('Track')->find({ cd_cref_cond => {} });
+} qr/\QA custom condition coderef can return at most 2 conditions, but relationship 'cd_cref_cond' on source 'Track' returned extra values: 3/;
+
done_testing;