On 3/26/15, Vladimir Panteleev via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > What is your use case for only logging specific exception types?
We already have scope(failure) with its defined semantics (it will not swallow the exception), changing that would be bad. So the only workable solution I see is to extend it via 'scope(failure, ExceptionType ex)'. It's not that I want to catch specific exceptions, but instead I really love using scope but often find myself wishing I could catch the exception, swallow it (not rethrow it) and log it, without a try/catch. Sometimes you're not allowed to propagate an exception (think nothrow functions, functions that interact with C, functions invoked in different threads, etc), so you have to try/catch and use logging. I kind of think extending scope could make this nicer to work with. It was just a passing thought, though. :)