Skip to content

Commit 7171fc2

Browse files
authored
Merge pull request #4179 from masatake/optlib2c--minor-fix
optlib2c: make the error message more specific when a wrong datatype is given
2 parents f5d1b76 + abfd6a9 commit 7171fc2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

misc/optlib2c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ my $fielddef_flags =
7575
{
7676
$datatype .= "FIELDTYPE_BOOL";
7777
}
78-
elsif (($1 eq 'bool+str') || ($1 eq 'str+bool'))
78+
elsif ($1 eq 'str+bool')
7979
{
8080
$datatype .= "FIELDTYPE_STRING|FIELDTYPE_BOOL";
8181
}
82+
elsif ($1 eq 'bool+str')
83+
{
84+
die "\"{datatype=$1}\": use str+bool instead of bool+str";
85+
}
8286
else
8387
{
8488
die "Unknown datatype specification: \"{datatype=$1}\" in \"--_fielddef-<LANG>=...\"";

0 commit comments

Comments
 (0)