URL.Parser.ParseError exception (URL v2.0.3)

Copy Markdown View Source

Exception describing a failure to parse the scheme-specific part of a URL.

URL.new/1 returns it, together with its message, in an {:error, {URL.Parser.ParseError, message}} tuple; only URL.new!/1 actually raises it.

Summary

Functions

Builds the exception from a message.

Functions

exception(msg)

Builds the exception from a message.

Arguments

  • message is a string describing what could not be parsed and where.

Returns

  • A t:t/0 exception struct.

Examples

iex> URL.Parser.ParseError.exception("expected a comma")
%URL.Parser.ParseError{message: "expected a comma"}