Changeset 10620


Ignore:
Timestamp:
2005-09-22T17:03:15+12:00 (19 years ago)
Author:
kjdon
Message:

now prints out some gli tags when bad args are encountered for plugins and classifiers ($gli not set here, so just printed them always). Also, for BasPlug, set up the encoding values outside of new(), otherwise the list gets added in multiple times

Location:
trunk/gsdl/perllib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/BasClas.pm

    r10347 r10620  
    254254    #print out the text usage of this classifier.
    255255    my $classTempClass = bless $self, $class;
     256    print STDERR "<BadClassifier c=$classifier_name>\n";
     257
    256258    &gsprintf(STDERR, "\n{BasClas.bad_general_option}\n", $classifier_name);
    257259    $classTempClass->print_txt_usage("");  # Use default resource bundle
  • trunk/gsdl/perllib/parse2.pm

    r10328 r10620  
    237237        # Process this argument and store the related
    238238        # information in %hashInputArg
    239         if(processArg($hashArg{$strOneArg},$aryptUserArguList,\%hashInputArg) == 0){ return 0;}
     239        if(processArg($hashArg{$strOneArg},$aryptUserArguList,\%hashInputArg) == 0){
     240            print STDERR "<BadArgumentValue a=$strOneArg>\n";
     241            return 0;}
    240242        }
    241243       
     
    250252        else
    251253        {
     254            print STDERR "<BadArgument a=$strOneArg>\n";
    252255            print STDERR " Error: occur in parse2.pm::parse()\n Extra Arguments: $strOneArg\n";
    253256            return 0;
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r10579 r10620  
    7272    [ { 'name' => "auto",
    7373    'desc' => "{BasPlug.input_encoding.auto}" } ];
     74
     75my $e = $encodings::encodings;
     76foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e))
     77{
     78    my $hashEncode =
     79    {'name' => $enc,
     80     'desc' => $e->{$enc}->{'name'}};
     81   
     82    push(@{$unicode_list},$hashEncode);
     83}
     84
     85push(@{$auto_unicode_list},@{$unicode_list});
    7486
    7587my $arguments =
     
    355367    # Set Encodings to the list!!
    356368
    357     my $e = $encodings::encodings;
    358     foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e))
    359     {
    360     my $hashEncode =
    361         {'name' => $enc,
    362          'desc' => $e->{$enc}->{'name'}};
    363 
    364     push(@{$unicode_list},$hashEncode);
    365     }
    366 
    367     push(@{$auto_unicode_list},@{$unicode_list});
    368369
    369370    # Start the BasPlug Constructor
     
    399400    {
    400401    my $classTempClass = bless $self, $class;
     402    print STDERR "<BadPlugin p=$plugin_name>\n";
    401403    &gsprintf(STDERR, "\n{BasPlug.bad_general_option}\n", $plugin_name);
    402404    $classTempClass->print_txt_usage("");  # Use default resource bundle
Note: See TracChangeset for help on using the changeset viewer.