OptionParser.parse_head-exclamation-mark

You're seeing just the function parse_head-exclamation-mark, go back to OptionParser module for more information.
Link to this function

parse_head!(argv, opts \\ [])

View Source

Specs

parse_head!(argv(), options()) :: {parsed(), argv()}

The same as parse_head/2 but raises an OptionParser.ParseError exception if any invalid options are given.

If there are no errors, returns a {parsed, rest} tuple where:

Examples

iex> OptionParser.parse_head!(
...>   ["--source", "lib", "path/to/file", "--verbose"],
...>   switches: [source: :string, verbose: :boolean]
...> )
{[source: "lib"], ["path/to/file", "--verbose"]}

iex> OptionParser.parse_head!(
...>   ["--number", "lib", "test/enum_test.exs", "--verbose"],
...>   strict: [number: :integer]
...> )
** (OptionParser.ParseError) 1 error found!
--number : Expected type integer, got "lib"

iex> OptionParser.parse_head!(
...>   ["--verbose", "--source", "lib", "test/enum_test.exs", "--unlock"],
...>   strict: [verbose: :integer, source: :integer]
...> )
** (OptionParser.ParseError) 2 errors found!
--verbose : Missing argument of type integer
--source : Expected type integer, got "lib"