Bug 11816 – std.stdio.slurp uninformative error message

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-25T08:45:30Z
Last change time
2024-12-01T16:19:44Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Moved to GitHub: phobos#10024 →

Comments

Comment #0 by andrei — 2013-12-25T08:45:30Z
http://forum.dlang.org/thread/[email protected]#post-utamhoiglwebynzfduua:40forum.dlang.org discusses that slurp does not specify file line and exact cause of error.
Comment #1 by andrei — 2013-12-25T08:46:19Z
Same discussion suggests slurp should be faster.
Comment #2 by b2.temp — 2019-02-13T01:43:40Z
For the record the idea was to catch std.conv.parse error in order to throw something more specifc to slurp: > Ine reason is that I want to provide helpful and verbose error messages for invalid input (e.g. "Invalid numeric value found in field 3 line 1000") - and with the "slurp" method, any input error will result in a not-so-helpful exception (e.g. "std.conv.ConvException@/usr/include/dmd/phobos/std/conv.d(2009): Unexpected 'H' when converting from type char[] to type ulong).
Comment #3 by robert.schadek — 2024-12-01T16:19:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10024 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB