Skip to content

Commit

Permalink
Error on unknown parameter
Browse files Browse the repository at this point in the history
- Incidentally, deleting some debug instructions.
  • Loading branch information
nocejo committed Apr 10, 2015
1 parent b2d3ffa commit c45d59a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions trev.pl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
my $STRING_MSG_RCN = "rc file not found, going with hard wired defaults.";
my $STRING_MSG_RCO = "Error opening rc file:";
my $STRING_MSG_RCC = "Erroneous construction in:";
my $STRING_MSG_RCP = "Unknown parameter in";
my $STRING_MSG_RET = "Press [RET] to continue: ";
my $STRING_MSG_STA = ": doesn't appear as visible.";
my $STRING_MSG_UND = "Not understood.";
Expand Down Expand Up @@ -181,10 +182,8 @@
while( <IN> ) {
chomp ;
if( m/^\s*$/ || m/^\s*#/ ) { next } # blank lines and comments out
# print( $_ , "\n" ) ; # DEBUG
if( m/^\s*review.(\w+).(\w+)*\s*\=\s*(.*)$/ ) { # legal trevrc line constuct
if( $1 eq $canbemode ) {
# print( "|$1|$2|$3|\n" ) ;
my $param = $2 ;
my $value = $3 ;
$value =~ s/\s*$// ;
Expand All @@ -202,7 +201,9 @@
elsif( $param eq "prompt" ) { $prompt = $value }
elsif( $param eq "lblstyle" ) { $lblstyle = $value }
elsif( $param eq "sepstyle" ) { $sepstyle = $value }
else { }
else {
goingout( "$STRING_MSG_RCP $rcfilepath : $param\n" , 35 , 0 ) ;
}
}
}
else {
Expand Down Expand Up @@ -239,6 +240,7 @@
$STRING_MSG_RCN = "fichero rc no encontrado, usando valores por defecto de script.";
$STRING_MSG_RCO = "Error abriendo el fichero rc:";
$STRING_MSG_RCC = "Construcción errónea en:";
$STRING_MSG_RCP = "Parámetro desconocido en";
$STRING_MSG_RET = "Presione [RET] para continuar. ";
$STRING_MSG_STA = ": no aparece como visible.";
$STRING_MSG_TIM = "Corriendo durante ";
Expand Down

0 comments on commit c45d59a

Please sign in to comment.