Skip to content

Commit 4ee05eb

Browse files
committed
Report unknown values for ImplementationOnlyImports
Before it would silently ignore the attempt, which might confuse users.
1 parent f89859f commit 4ee05eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/protoc-gen-swift/GeneratorOptions.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ class GeneratorOptions {
9696
case "ImplementationOnlyImports":
9797
if let value = Bool(pair.value) {
9898
implementationOnlyImports = value
99+
} else {
100+
throw GenerationError.invalidParameterValue(name: pair.key,
101+
value: pair.value)
99102
}
100103
default:
101104
throw GenerationError.unknownParameter(name: pair.key)

0 commit comments

Comments
 (0)