What is throwable

Steve Teale steve.teale at britseyeview.com
Thu Mar 19 09:53:31 PDT 2009


Sean Kelly Wrote:

> Steve Teale wrote:
> > 
> > What is the point of class Throwable if you can throw any old class object?
> 
> I think a case could be made for allowing only children of Throwable to 
> be thrown.  It's possible to throw integers and strings in C++, for 
> example, which is totally ridiculous.  However, at the moment Throwable 
> simply serves as the common base class for Exception and Error, and 
> holds file and line info as well as the stack trace hooks.

It's exactly what you would expect based on the languages that D has borrowed from, but if it does not mean throwable, what's the point?

I still don't know what the significance of Exception and Error might be.




More information about the Digitalmars-d mailing list