C++ Logo


Advanced search

Re: [std-proposals] Standard Library assistance in logging of all exceptions

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Wed, 28 Feb 2024 22:40:49 +0000
On Wed, Feb 28, 2024 at 10:26 PM Sebastian Wittmeier wrote:
> If you want a callback for exceptions thrown, write a small routine, and register it as debugger of your program.
> So now every time an exception is thrown, the 'throw handler' is
> called before the exception is thrown.

The process begins as a .NET C# program, which then loads a DLL file
(which was written in C++) into its address space. I found it
impossible to debug the DLL file while it's loaded into the C#

But anyway, having a new feature in the standard library,
"std::set_throw", would be useful in many ways. You could torture-test
a program and leave it running for two weeks, and then at then end of
it all, go through the list of all exceptions that were thrown.

Received on 2024-02-28 22:41:01