www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - void myMethod() throw()

reply Sam Hu <samhudotsamhu gmail.com> writes:
Does D2 has the equivalent implemenation of exception no throw out of a method:

void myMethod() throw(){}

Or,D2 has its own/better implementation on such feature,if yes,what is that?

Thanks in advance.
Regards,
Sam
Jul 19 2009
parent reply "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
Sam Hu wrote:
 Does D2 has the equivalent implemenation of exception no throw out of a method:
 
 void myMethod() throw(){}
 
 Or,D2 has its own/better implementation on such feature,if yes,what is that?
 
 Thanks in advance.
 Regards,
 Sam
Yes, it's called nothrow. :) nothrow void myMethod() { ... } -Lars
Jul 20 2009
parent reply Sam Hu <samhudotsamhu gmail.com> writes:
Lars T. Kyllingstad Wrote:
 
 Yes, it's called nothrow. :)
 
 nothrow void myMethod() { ... }
 
 -Lars
Thanks a lot.I have tried to search in section Expression,Statment,Classes ,Handling Errors of D2 spec but no found...
Jul 20 2009
parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
Sam Hu wrote:
 Lars T. Kyllingstad Wrote:
 Yes, it's called nothrow. :)

 nothrow void myMethod() { ... }

 -Lars
Thanks a lot.I have tried to search in section Expression,Statment,Classes ,Handling Errors of D2 spec but no found...
It's located under "Functions": http://www.digitalmars.com/d/2.0/function.html#nothrow-functions -Lars
Jul 20 2009