http://d.puremagic.com/issues/show_bug.cgi?id=4518

           Summary: to!string(enum w/invalid value) produces a somewhat
                    unhelpful error
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bra...@puremagic.com


--- Comment #0 from Brad Roberts <bra...@puremagic.com> 2010-07-27 01:24:41 PDT 
---
I don't have a quick repro demo yet, but the result is this:

std.conv.ConvError: There is no corresponding enum member name in const(myEnum)

It would be very nice to add the actual value encountered.

Quick incomplete/untested mockup:

enum A { a = 1 }

writef("%s", cast(A)2);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to