- Timestamp:
- 2013-03-22T16:39:00+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm
r27111 r27112 793 793 794 794 if ($metamode ne "done" && $curr_secnum ne $opt_doc_secnum) { 795 print STDERR "@@@ $tagname Finished processing FINAL Section [$curr_secnum|$opt_doc_secnum]\n";795 print STDERR "@@@ $tagname Finished processing FINAL Section.\n"; 796 796 797 797 my $metaname = $parser->{'parameters'}->{'metaname'}; 798 798 my $metavalue = $parser->{'parameters'}->{'metavalue'}; 799 799 800 print STDERR "@@@ Unknown requested section number $opt_doc_secnum\n"; 801 print STDERR "\tas final section number in document was $curr_secnum\n"; 802 print STDERR "\tMetadata value '$metavalue' for meta '$metaname'\n"; 803 print STDERR "\tin section $opt_doc_secnum discarded.\n"; 800 print STDERR "@@@ Requested section number $opt_doc_secnum not found.\n"; 801 print STDERR "\t(last seen section number in document was $curr_secnum)\n"; 802 print STDERR "\tDiscarded metadata value '$metavalue' for meta '$metaname'\n"; 803 print STDERR "\tin section $opt_doc_secnum.\n"; 804 $parser->{'custom_err_msg'} = "Requested section number $opt_doc_secnum not found."; 804 805 } 805 806 … … 962 963 } 963 964 } 965 966 # copy across any custom error information that was stored during parsing 967 $self->{'error_msg'} = $parser->{'custom_err_msg'} if(defined $parser->{'custom_err_msg'}); 964 968 } 965 969 … … 1053 1057 $self->edit_doc_xml($gsdl_cgi,$doc_xml_filename, 1054 1058 $metaname,$metavalue,$metapos,$metamode,$docid_secnum,$prevmetavalue); 1055 1056 return 0; # return 0 for now to indicate no error 1059 1060 # return 0; # return 0 for now to indicate no error 1061 return (defined $self->{'error_msg'}) ? 1 : 0; 1057 1062 } 1058 1063 … … 1117 1122 my $mess .= "Failed to set archives metadata key: $docid\n"; 1118 1123 $mess .= "Exit status: $status\n"; 1119 $mess .= "System Error Message: $!\n"; 1124 if(defined $self->{'error_msg'}) { 1125 $mess .= "Error Message: $self->{'error_msg'}\n"; 1126 } else { 1127 $mess .= "System Error Message: $!\n"; 1128 } 1120 1129 $mess .= "-" x 20 . "\n"; 1121 1130
Note:
See TracChangeset
for help on using the changeset viewer.