[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [certi-dev] RTI Ambassador Throwing Possible Exception
From: |
David Come |
Subject: |
Re: [certi-dev] RTI Ambassador Throwing Possible Exception |
Date: |
Thu, 28 May 2015 21:48:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Hi Doug.
Le 28/05/2015 20:36, Doug a écrit :
I've been having problems compiling CERTI with some more current c++
compilers including GCC and Clang. Both complain that my class (which
includes an instance of RTIambassador) is possibly throwing an
exception when, by default, it shouldn't --- the exception of interest
happens in the RTIambassador destructor:
RTI::RTIambassador::~RTIambassador()
throw (RTI::RTIinternalError)
From everything I've read, it's 'bad form' to possibly throw
exceptions in destructor's.
It is bad because if you are already stack unwinding froma previous
exception, then if a destructor throws another exception, then which one
to chose ?
The default behaiour is a call to terminate (or abort). Anyway, no way
to get the program on its feets if this were to happen.
Is there an easy 'fix' to resolving this problem?
Dont be standard compliant with HLA ?
Thanks,
Doug
David.