Skip to content

Commit

Permalink
Update error message to mention initializers (apple#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
natecook1000 authored May 5, 2020
1 parent c23dfb2 commit 3166c45
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/ArgumentParser/Parsable Types/ParsableArguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,13 @@ internal let directlyInitializedError = """
--------------------------------------------------------------------
Can't read a value from a parsable argument definition.
This error indicates that a `ParsableCommand` or `ParsableArguments`
type is being initialized directly, instead of by calling `parse`,
`parseAsRoot`, or `main`. See the documentation for correct usage.
This error indicates that a property declared with an `@Argument`,
`@Option`, `@Flag`, or `@OptionGroup` property wrapper was neither
initialized to a value nor decoded from command-line arguments.
To get a valid value, either call one of the static parsing methods
(`parse`, `parseAsRoot`, or `main`) or define an initializer that
initializes _every_ property of your parsable type.
--------------------------------------------------------------------
"""

0 comments on commit 3166c45

Please sign in to comment.