[erlang-questions] Improve errors for maps

Darach Ennis darach@REDACTED
Fri Feb 27 16:34:43 CET 2015


+1

On Fri, Feb 27, 2015 at 3:27 PM, Loïc Hoguin <essen@REDACTED> wrote:

> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150227/3266bc1d/attachment.htm>


More information about the erlang-questions mailing list