Checked exceptions [Re: Hijacking]

Christopher Wright dhasenan at gmail.com
Thu Aug 9 19:03:10 PDT 2007


eao197 wrote:
> However sometimes is good to know that some method doesn't throw 
> exception at all (it could be necessary for exception safety, like C++ 
> convection that swap() methods and destructors are exception free). So I 
> suppose to introduce 'nothrows' modifier as a sign that some routine is 
> exception free:

The compiler can support this. It'd have to add more metadata to 
precompiled libraries, but that's okay. The ddocs could then 
(optionally?) include information on what exceptions the function throws 
directly and what other exceptions can be thrown on invocation.

So I don't see any reason for the programmer to have to manually do all 
this.

-cbw



More information about the Digitalmars-d mailing list