www.digitalmars.com         C & C++   DMDScript  

D - [Bug] AssertError.toString() == "Object"

For some reason, AssertError is missing a toString() definition, instead 
defining its own print() method.  This means that the following program 
just prints "Object", rather than giving a description of the error.

Consistency is lost, and it becomes impossible to display the error by 
some other means, and hence to easily pinpoint assert errors in Windows 
GUI apps.

Moreover, why is AssertError descended straight from Object, and not 
from Exception or Error?


import std.c.stdio;

int main() {
	try {
		assert (false);
	} catch (Object e) {

	return 0;

My e-mail is valid but not my primary mailbox, aside from its being the 
unfortunate victim of intensive mail-bombing at the moment.  Please keep 
replies on the 'group where everyone may benefit.
Jan 29 2004