scope() statements and return
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 3 22:33:13 PDT 2014
On Sat, 04 Oct 2014 05:22:10 +0000
Ola Fosheim Grostad via Digitalmars-d <digitalmars-d at puremagic.com>
wrote:
> >> Should or should not, you have to make do with what you get
> >> from libraries.
> > wrapper is the answer.
> I dont disagree, but the language spec says that you cannot catch
> in a finally block... (which is the same as scope(exit).
and... wrapper is the answer! ;-)
void myWrapper () nothrow {
try throwItAtMe(); catch (LovelyException) {}
}
scope(exit) myWrapper();
this is perfectly legal, as we not cathcing anything in scope(exit).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141004/c03d50c3/attachment.sig>
More information about the Digitalmars-d
mailing list