Changeset 11865 for trunk/cic-hcap


Ignore:
Timestamp:
2006-05-26T12:45:01+12:00 (18 years ago)
Author:
mdewsnip
Message:

Added a check to make sure the images were converted successfully, and provides an error back to the GLI if not.

File:
1 edited

Legend:

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

    r11864 r11865  
    807807    print $outhandle "RESULT = $image_result\n" if ($self->{'verbosity'} > 2);
    808808
     809    # Check that the converted image exists
     810    if (!-f $image_file_path) {
     811        print STDERR "<ProcessingError n='$image_file_path' p='CICPlug' r='Could not be created'>\n" if ($self->{'gli'});
     812        print STDERR "Error: Image $image_file_path could not be created.\n";
     813        return;
     814    }
     815
    809816    # Get image dimensions
    810817    if ($image_command !~ /\-scale / && $image_result =~ m/([0-9]+)x([0-9]+)/) {
Note: See TracChangeset for help on using the changeset viewer.