I'm working on an application where I want log all exceptions but
I'm not sure what's the best way to realize that. Sure I can do
the following:
void myMethod() nothrow
{
try
{
// Do something
}
catch (Exception e)
{
// Write log file
}
}
But there are some
On 05/24/2014 10:09 AM, Tim wrote:
I'm working on an application where I want log all exceptions but I'm
not sure what's the best way to realize that.
A common solution is to log it in the exception class'es constructor. We
even dump the backtrace with libunwind in our C++ application.
On Saturday, 24 May 2014 at 17:55:07 UTC, Ali Çehreli wrote:
On 05/24/2014 10:09 AM, Tim wrote:
I'm working on an application where I want log all exceptions
but I'm
not sure what's the best way to realize that.
A common solution is to log it in the exception class'es
constructor. We even
On Saturday, 24 May 2014 at 17:09:24 UTC, Tim wrote:
Imagine I've an application where I want log all thrown
exceptions.
Arguably, that's not something you'd want to do. In a normal
application, exceptions get thrown around, and it is completely
normal. In particular, the *thrower* has no
On Saturday, 24 May 2014 at 17:09:24 UTC, Tim wrote:
But doing this in all my methods
You shouldn't do it in all methods, only top-level ones, because
they are called from 3rd party code, which will do whatever
things with the exceptions from nothing to terminating the
application. Already