Rethrow an exception like in C++?

Jonathan M Davis jmdavisProg at gmx.com
Fri Mar 8 01:00:54 PST 2013


On Friday, March 08, 2013 09:39:12 Rob T wrote:
> That's OK for 20 try catch but specifying catch(Exception E) over
> and over adds up when you have to write a lot more of those. Copy
> paste helps, but not always.

So, the only difference is that C++ is

catch(...)
{
    throw trace();
}

whereas D is

catch(Exception e)
{
    throw trace(e);
}

If that's the case, I really don't see what the problem is. It's just a few 
characters difference.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list