Skip to content

Commit

Permalink
Merge pull request #4179 from masatake/optlib2c--minor-fix
Browse files Browse the repository at this point in the history
optlib2c: make the error message more specific when a wrong datatype is given
  • Loading branch information
masatake authored Jan 22, 2025
2 parents f5d1b76 + abfd6a9 commit 7171fc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/optlib2c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ my $fielddef_flags =
{
$datatype .= "FIELDTYPE_BOOL";
}
elsif (($1 eq 'bool+str') || ($1 eq 'str+bool'))
elsif ($1 eq 'str+bool')
{
$datatype .= "FIELDTYPE_STRING|FIELDTYPE_BOOL";
}
elsif ($1 eq 'bool+str')
{
die "\"{datatype=$1}\": use str+bool instead of bool+str";
}
else
{
die "Unknown datatype specification: \"{datatype=$1}\" in \"--_fielddef-<LANG>=...\"";
Expand Down

0 comments on commit 7171fc2

Please sign in to comment.