exception types & objects

Kagamin spam at here.lot
Tue Oct 19 11:53:02 PDT 2010


spir Wrote:

> I was expecting (from exp with other language) there to be a root Error or Exception type implementating base exception mechanics and/or an imposed interface to comply with (esp a kind of string method returning what text to write out when the exception is not caught).

Exception mechanics consists of taking an object pointer, putting it into exception record, unwinding stack, catch takes the pointer, tests its runtime type against what you specified in catch statement and gives the pointer to user code. In fact, toString method is inherited from Object.


More information about the Digitalmars-d-learn mailing list