Changeset 1416


Ignore:
Timestamp:
10/07/15 16:48:36 (9 years ago)
Author:
nanardon
Message:

Avoid useless error messages

Location:
trunk/LATMOS-Accounts/lib/LATMOS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r1413 r1416  
    1111use LATMOS::Accounts::Acls; 
    1212 
    13 our $VERSION = '5.0.0'; 
     13our $VERSION = '5.0.2'; 
    1414 
    1515=head1 NAME 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm

    r1415 r1416  
    203203    if ($self->{checkinputformat}) { 
    204204        if (!$self->{checkinputformat}->($value)) { 
     205           return; 
     206        } 
     207    } 
     208 
     209    return 1; 
     210} 
     211 
     212=head2 checkinput ($value) 
     213 
     214Check input value, return false on error 
     215 
     216=cut 
     217 
     218sub checkinput { 
     219    my ($self, $values) = @_; 
     220 
     221    foreach my $value (ref $values ? @{ $values } : $values) { 
     222        if (!$self->checkinputformat($value)) { 
    205223            $self->base->log(LA_ERR, "Wrong format for  %s/%s: %s", 
    206224               $self->name, 
    207225               $self->{_otype}, 
    208226               $value 
    209            ); 
    210            return; 
    211         } 
    212     } 
    213  
    214     return 1; 
    215 } 
    216  
    217 =head2 checkinput ($value) 
    218  
    219 Check input value, return false on error 
    220  
    221 =cut 
    222  
    223 sub checkinput { 
    224     my ($self, $values) = @_; 
    225  
    226     foreach my $value (ref $values ? @{ $values } : $values) { 
    227         if (!$self->checkinputformat($value)) { 
     227            ); 
    228228            return; 
    229229        } 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1415 r1416  
    692692        # Invalid filter due to impossible value: 
    693693        $attribute->checkinputformat($val) or do { 
    694             $base->log(LA_ERR, "Invalid value $val for attribute $attr"); 
     694            $base->log(LA_ERR, "Invalid format value $val for attribute $attr"); 
    695695            return; 
    696696        }; 
Note: See TracChangeset for help on using the changeset viewer.