Changeset 2755 for trunk/gsdl/perllib/plugins
- Timestamp:
- 2001-09-26T10:43:44+12:00 (23 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BasPlug.pm
r2751 r2755 175 175 sub init { 176 176 my $self = shift (@_); 177 my ($verbosity, $outhandle ) = @_;177 my ($verbosity, $outhandle, $faillogname) = @_; 178 178 179 179 # verbosity is passed through from the processor … … 182 182 # as is the outhandle ... 183 183 $self->{'outhandle'} = $outhandle if defined $outhandle; 184 $self->{'faillogname'} = $faillogname; 184 185 185 186 # set process_exp and block_exp to defaults unless they were -
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r2751 r2755 168 168 print $outhandle "Converting $tailname$suffix to $convert_to format\n"; 169 169 } 170 171 my $errlog = &util::filename_cat($tmp_dirname, "err.log"); 170 172 171 173 # Execute the conversion command and get the type of the result, 172 174 # making sure the converter gives us the appropriate output type 173 175 my $output_type = lc($convert_to); 174 my $cmd = "perl -S gsConvert.pl -verbose $verbosity - output $output_type \"$tmp_filename\"";176 my $cmd = "perl -S gsConvert.pl -verbose $verbosity -errlog \"$errlog\" -output $output_type \"$tmp_filename\""; 175 177 $output_type = `$cmd`; 176 178 … … 182 184 if ($output_type eq "fail") { 183 185 print $outhandle "Could not convert $tailname$suffix to $convert_to format\n"; 186 if ($self->{'faillogname'} ne "" && -s "$errlog") { 187 open(SAVELOG, ">>$self->{'faillogname'}"); 188 open(ERRLOG, "$errlog"); 189 print SAVELOG "$tailname$suffix (converting to $convert_to) failed:\n"; 190 while (<ERRLOG>) { 191 print SAVELOG "$_"; 192 } 193 close ERRLOG; 194 print SAVELOG "\n"; 195 close SAVELOG; 196 } 197 &util::rm("$errlog") if (-e "$errlog"); 184 198 return ""; 185 199 }
Note:
See TracChangeset
for help on using the changeset viewer.