Upgrade the "too many args on customcond" warning from 1adbd3f to an exception
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource.pm
index c03c8da..c5feb09 100644 (file)
@@ -1864,8 +1864,8 @@ sub _resolve_relationship_condition {
 
     ($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}) {