[erlang-questions] Improve errors for maps

Loïc Hoguin essen@REDACTED
Fri Feb 27 16:27:04 CET 2015


On 02/27/2015 03:17 PM, José Valim wrote:
> 1. {badmap, Term} - raised when a map was expected but got something
> else (this would replace the first error and it is an improvement over
> the error records used to raise)
>
> 2. {badkey, Key, Map} - raised when we expected a Map to have Key but it
> does not. Useful for the := syntax and it could also be used if we ever
> add an access operation to maps
>
> If we segregate the errors as proposed, we will have plenty of
> opportunity to improve the reports in shell and in error loggers.
>
> Thoughts?

Sounds good.

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list