Bug 7192 – improve error message for "object.d cannot be read"
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-31T17:13:00Z
Last change time
2015-06-09T05:10:38Z
Assigned to
andrej.mitrovich
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2011-12-31T17:13:30Z
Would be good to special-case this one, in module.c:
----
void Module::read(Loc loc)
{
//printf("Module::read('%s') file '%s'\n", toChars(), srcfile->toChars());
if (srcfile->read())
{ error(loc, "is in file '%s' which cannot be read", srcfile->toChars());
----
If srcfile == "object.d", it means there's a problem with the installation.
Instead of the generic message, we could print something like,
error(loc, "cannot find source code for runtime library file 'object.d');
errorSupplemental("dmd is not correctly installed. Paths in configuration file 'dmd.conf' may be incorrect.");
This would help make D more newbie-friendly.
Comment #1 by andrej.mitrovich — 2012-10-28T11:48:39Z
*** Issue 3408 has been marked as a duplicate of this issue. ***
Comment #2 by github-bugzilla — 2012-11-21T16:27:50Z