Is there a way to bypass the file and line into D assert function ?
Newbie2019
newbie2019 at gmail.com
Fri Jul 19 15:30:25 UTC 2019
for example:
void ASSERT(string fmt, string file = __FILE_FULL_PATH__, size_t
line = __LINE__, T...) (bool c, scope T a) @nogc {
assert(c, string, file, line);
}
but i get this error:
error.d(39): Error: found file when expecting )
error.d(39): Error: found ) when expecting ; following statement
error.d(39): Deprecation: use { } for an empty statement, not ;
I want d to print the error message with some format information,
and show the right file and line for the original location.
Is it doable ?
More information about the Digitalmars-d-learn
mailing list