Changeset 11876


Ignore:
Timestamp:
2006-05-29T16:36:29+12:00 (18 years ago)
Author:
mdewsnip
Message:

All errors now go to the fail.log file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/perllib/plugins/CICPlug.pm

    r11875 r11876  
    3030use DBI;
    3131use strict;
     32no strict 'refs';
    3233
    3334
     
    201202    my $self = shift(@_);
    202203    my $dbh = shift(@_);
     204    my $fail_log_handle = $self->{'failhandle'};
    203205
    204206    # Prepare SQL statement for getting everything from the Institution table
     
    269271        print STDERR "<ProcessingError n='Institution $institution_id' p='CICPlug' r='No best image'>\n" if ($self->{'gli'});
    270272        print STDERR "Error: Institution $institution_id -- No best image.\n";
     273        print $fail_log_handle "Error: Institution $institution_id -- No best image.\n";
    271274        $self->{'num_not_processed'}++;
    272275        next;
     
    281284        print STDERR "<ProcessingError n='Institution $institution_id' p='CICPlug' r='Could not match best image $institution_best_place_image_name to a file'>\n" if ($self->{'gli'});
    282285        print STDERR "Error: Institution $institution_id -- Could not match best image $institution_best_place_image_name to a file.\n";
     286        print $fail_log_handle "Error: Institution $institution_id -- Could not match best image $institution_best_place_image_name to a file.\n";
    283287        $self->{'num_not_processed'}++;
    284288        next;
     
    321325            print STDERR "<ProcessingError n='$institution_campus_plan_pdf_file_path' p='CICPlug' r='Does not exist'>\n" if ($self->{'gli'});
    322326            print STDERR "Error: File $institution_campus_plan_pdf_file_path does not exist.\n";
     327            print $fail_log_handle "Error: File $institution_campus_plan_pdf_file_path does not exist.\n";
    323328        }
    324329        }
     
    365370    my $self = shift(@_);
    366371    my $dbh = shift(@_);
     372    my $fail_log_handle = $self->{'failhandle'};
    367373
    368374    # Prepare SQL statement for getting everything from the Place table
     
    450456        print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Missing place name'>\n" if ($self->{'gli'});
    451457        print STDERR "Error: Place $place_id -- Missing place name.\n";
     458        print $fail_log_handle "Error: Place $place_id -- Missing place name.\n";
    452459        $self->{'num_not_processed'}++;
    453460        next;
     
    459466        print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Missing place type'>\n" if ($self->{'gli'});
    460467        print STDERR "Error: Place $place_id -- Missing place type.\n";
     468        print $fail_log_handle "Error: Place $place_id -- Missing place type.\n";
    461469        $self->{'num_not_processed'}++;
    462470        next;
     
    473481        print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Missing construction date'>\n" if ($self->{'gli'});
    474482        print STDERR "Error: Place $place_id -- Missing construction date.\n";
     483        print $fail_log_handle "Error: Place $place_id -- Missing construction date.\n";
    475484        $self->{'num_not_processed'}++;
    476485        next;
     
    529538        print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Missing function'>\n" if ($self->{'gli'});
    530539        print STDERR "Error: Place $place_id -- Missing function.\n";
     540        print $fail_log_handle "Error: Place $place_id -- Missing function.\n";
    531541        next;
    532542        }
     
    535545        print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Missing function year'>\n" if ($self->{'gli'});
    536546        print STDERR "Error: Place $place_id -- Missing function year.\n";
     547        print $fail_log_handle "Error: Place $place_id -- Missing function year.\n";
    537548        next;
    538549        }
     
    614625    my $self = shift(@_);
    615626    my $dbh = shift(@_);
     627    my $fail_log_handle = $self->{'failhandle'};
    616628
    617629    # Prepare SQL statement for getting all the Architects from the Place table
     
    735747    my $self = shift(@_);
    736748    my ($doc_obj, $place_image_location, $place_image_size) = (@_);
     749    my $fail_log_handle = $self->{'failhandle'};
    737750
    738751    # Don't bother with empty values
     
    751764    print STDERR "<ProcessingError n='$place_image_file_path' p='CICPlug' r='Does not exist'>\n" if ($self->{'gli'});
    752765    print STDERR "Error: Image $place_image_file_path does not exist.\n";
     766    print $fail_log_handle "Error: Image $place_image_file_path does not exist.\n";
    753767    return;
    754768    }
     
    806820        print STDERR "<ProcessingError n='$image_file_path' p='CICPlug' r='Could not be created'>\n" if ($self->{'gli'});
    807821        print STDERR "Error: Image $image_file_path could not be created.\n";
     822        print $fail_log_handle "Error: Image $image_file_path could not be created.\n";
    808823        return;
    809824    }
Note: See TracChangeset for help on using the changeset viewer.