Thread overview
void myMethod() throw()
Jul 20, 2009
Sam Hu
Jul 21, 2009
Sam Hu
July 20, 2009
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
July 20, 2009
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
July 21, 2009
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...
July 21, 2009
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