why scope(success)?

Sean Kelly sean at f4.ca
Tue May 9 12:55:34 PDT 2006


Ben Hinkle wrote:
> I hope this doesn't come of as a flame, but I'm wondering if anyone is using 
> scope(success) and why. I can't find any reason for it.

How about a DB transaction you only want to commit if there are no 
errors generating data.  You might want something like this:

     scope(success) tran.commit();
     scope(failure) tran.rollback();

Sean



More information about the Digitalmars-d mailing list