https://d.puremagic.com/issues/show_bug.cgi?id=12260

           Summary: Improve error of std.stdio.readf when involving
                    whitespace
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Jesse Phillips <[email protected]> 2014-02-25 
19:56:51 PST ---
The following program will throw an exception on the second read.

------
void main()
{
    import std.stdio;
    int input;
    readf("%s", &input);
    readf("%s", &input);
}
------

The exceptions message points out the remaining newline from the first input:

--------
conv.d(1901): Unexpected '
' when converting from type LockingTextReader to type int
--------

It should probably convert whitespace into a more recognizable form:

-------
conv.d(1901): Unexpected '\n' when converting from type LockingTextReader to
type int
-------

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

Reply via email to