[erlang-questions] Maps branch and disclaimers
Erik Søe Sørensen
eriksoe@REDACTED
Wed Oct 30 15:22:00 CET 2013
I'd say that is one case where consistency (with badrecord, at least) isn't
the best policy -
I've often been annoyed that the badrecord error (opposite the badmatch
one) doesn't tell you what the actual value was. In most cases, the record
name can be inferred from the stacktrace. The actual value is therefore far
more interesting.
Den 30/10/2013 14.02 skrev "Anthony Ramine" <n.oxyde@REDACTED>:
> Err, Arg#foo{bar=qux} fails with {badrecord,foo} when Arg is not a foo
> record.
>
> A bad map update should fail with the atom badmap.
>
> --
> Anthony Ramine
>
> Le 30 oct. 2013 à 13:58, Anthony Ramine <n.oxyde@REDACTED> a écrit :
>
> > A bad record update (Arg#foo{bar=qux}) errors out with {badrecord,Arg}.
> >
> > A bad map update should fail with {badmap,Arg}.
> >
> > --
> > Anthony Ramine
> >
> > Le 30 oct. 2013 à 13:40, Robert Virding <
> robert.virding@REDACTED> a écrit :
> >
> >> - generate 'badarg' errors instead of 'badmap' which would be
> consistent with other type errors.
> >>
> >
>
> _______________________________________________
> 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/20131030/95855b82/attachment.htm>
More information about the erlang-questions
mailing list