Re: How to log every exception in a ROOT algorithm (including catched ones)

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 5 Sep 2008 13:04:45 -0500


Hi,

I do not think that C++ will let you intercept exception that are caught unless you have control of the catching code. To log the uncatch exception, you would simply wrap your calls with a try catch block.

Cheers,
Philippe.

If this is really a requirements for your framework then you will need to impose some rules on the user.
Either use a macro to replace 'throw' or derived all their exception from a base class.

Tim München wrote:
> Hi,
>
> can the logging of all exceptions (catched and uncatched) within arbitrary
> user algorithms (C++) run inside of ROOT be accomplished somehow? As a first
> step, I'd like to just have stdout output at each exception, or the logging
> of them into a logfile; The user code itself shouldn't have to be
> adapted/changed in any way to reach that goal. Is this possbile?
>
>
> Thanks,
>
> Tim München
>
>
Received on Fri Sep 05 2008 - 20:04:52 CEST

This archive was generated by hypermail 2.2.0 : Sat Sep 06 2008 - 11:50:02 CEST