import error and error types

spir denis.spir at gmail.com
Sun Mar 27 06:24:22 PDT 2011


Hello,

"import algorithm;" generates the error message:
test.d(35): Error: module algorithm is in file 'algorithm.d' which cannot be read

Three notes:
* The message is wrong: the error is precisely due to the fact no file 
'algorithm.d' was found.
* A nice tip for phobos modules would be to hint "Did you forget the prefix 
'std.'?".
* There is no mention of import, which would be helpful ;-)

More generally, dmd (and build/link) errors have no "type". Giving errors a 
written type is very helpful (not only to the user, also to organise, name, and 
formulates error messages properly).

test.d(35): Import Error: cannot find module file 'algorithm.d' (in current 
directory or standard import directories).
Did you forget the prefix 'std.' needed to import Phobos modules?

(The additional tip only when module name matches a phobos module name.)


Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list