exception types & objects

Denis Koroskin 2korden at gmail.com
Tue Oct 19 12:03:11 PDT 2010


On Tue, 19 Oct 2010 22:54:33 +0400, Kagamin <spam at here.lot> wrote:

> spir Wrote:
>
>> The example uses an Excpetion type, but the somewhat comment  
>> contradicts it. Can one really use any kind of object as exception?
>
> ps it's fun to throw strings in javascript, try it.
> :3

I've been throwing const char* in C++:

try {
	throw "not implemented";
} catch (const char* message) {
	printf("Exception: %s\n", message);
}


More information about the Digitalmars-d-learn mailing list