[PATCH] RTT: Added way to disable exception catching

Please find attached a patch that could make the debuggers/developers
life much easier.
suggestions are welcome.

Greetings,
Matthias

AttachmentSize
0001-Exception-handling-Added-option-to-disable-exception.patch12.25 KB

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 10/17/2013 03:00 PM, Matthias Goldhoorn wrote:
> Please find attached a patch that could make the debuggers/developers
> life much easier.
> suggestions are welcome.

I don't like the idea of using a compile-time flag. We should not have
to rebuild the complete stack each time we want to turn it on.

A global flag on the RTT namespace, set automatically using an
environment variable would look a lot better to me

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

mentioned to Matthias (e.g. that the static variable does not work).

For simplicity sake, I would personally remove the CMake option, what do
you think ?

He also needs a file into which to put the #define and all, he picked
Config.hpp but I find that not so-satisfactory. Any idea there ?

Sylvain

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

Hi,

On Tue, Oct 22, 2013 at 3:34 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> @Peter: could you have a look ? There are a few things I already
> mentioned to Matthias (e.g. that the static variable does not work).

Why doesn't it, it's only used in the local compilation unit and not
in headers ?

>
> For simplicity sake, I would personally remove the CMake option, what do
> you think ?

agreed.

>
> He also needs a file into which to put the #define and all, he picked
> Config.hpp but I find that not so-satisfactory. Any idea there ?

move it into rtt/impl and make sure that no public header includes
it... it's subject to name clashing.
maybe name it rtt/impl/CatchConfig.h ?

Also, the patch is full of trailing whitespace... please apply the
final version with whitespace squelching.

Peter

>
> Sylvain
> _______________________________________________
> Rock-dev mailing list
> Rock-dev [..] ...
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 10/23/2013 10:14 AM, Peter Soetens wrote:
> Hi,
>
> On Tue, Oct 22, 2013 at 3:34 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
>> @Peter: could you have a look ? There are a few things I already
>> mentioned to Matthias (e.g. that the static variable does not work).
> Why doesn't it, it's only used in the local compilation unit and not
> in headers ?
My issue with it is that it cannot then be set from within the C++ API
(only from the runtime environment)
>> He also needs a file into which to put the #define and all, he picked
>> Config.hpp but I find that not so-satisfactory. Any idea there ?
> move it into rtt/impl and make sure that no public header includes
> it... it's subject to name clashing.
> maybe name it rtt/impl/CatchConfig.h ?
That sounds good.
> Also, the patch is full of trailing whitespace... please apply the
> final version with whitespace squelching.
Agreed.

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 23.10.2013 10:29, Sylvain Joyeux wrote:
> On 10/23/2013 10:14 AM, Peter Soetens wrote:
>> Hi,
>>
>> On Tue, Oct 22, 2013 at 3:34 PM, Sylvain Joyeux<sylvain [dot] joyeux [..] ...> wrote:
>>> @Peter: could you have a look ? There are a few things I already
>>> mentioned to Matthias (e.g. that the static variable does not work).
>> Why doesn't it, it's only used in the local compilation unit and not
>> in headers ?
> My issue with it is that it cannot then be set from within the C++ API
> (only from the runtime environment)
*fixed* -> needs a CatchConfig.cpp then also.
>>> He also needs a file into which to put the #define and all, he picked
>>> Config.hpp but I find that not so-satisfactory. Any idea there ?
>> move it into rtt/impl and make sure that no public header includes
>> it... it's subject to name clashing.
>> maybe name it rtt/impl/CatchConfig.h ?
@peter, there is currently no rtt/impl folder, should i create a new one
for this or did you mention another one?
(what should impl stay for?)

> That sounds good.
>> Also, the patch is full of trailing whitespace... please apply the
>> final version with whitespace squelching.
*fixed*
> Agreed.
>

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

>>> move it into rtt/impl and make sure that no public header includes
>>> it... it's subject to name clashing.
>>> maybe name it rtt/impl/CatchConfig.h ?
> @peter, there is currently no rtt/impl folder, should i create a new one
> for this or did you mention another one?
> (what should impl stay for?)
By side this, you find the patch attached. If sou still want that i move
the files around please let me know were i should put them.
Otherwise everything is worked done you mentioned.

Greetings,
Matthias

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On Fri, Oct 25, 2013 at 9:26 AM, Matthias Goldhoorn
<matthias [dot] goldhoorn [..] ...> wrote:
>
>>>> move it into rtt/impl and make sure that no public header includes
>>>> it... it's subject to name clashing.
>>>> maybe name it rtt/impl/CatchConfig.h ?
>>
>> @peter, there is currently no rtt/impl folder, should i create a new one
>> for this or did you mention another one?
>> (what should impl stay for?)
>
> By side this, you find the patch attached. If sou still want that i move the
> files around please let me know were i should put them.
> Otherwise everything is worked done you mentioned.

Oops, I meant 'internal' not 'impl'...

The rest looks fine to me...

Peter

>
> Greetings,
> Matthias
>
>
>
> --
> Dipl.-Inf. Matthias Goldhoorn
> Space and Underwater Robotic
>
> Universität Bremen
> FB 3 - Mathematik und Informatik
> AG Robotik
> Robert-Hooke-Straße 5
> 28359 Bremen, Germany
>
> Tel.: +49 421 178 45-4193
> Zentrale: +49 421 178 45-6550
> Fax: +49 421 178 45-4150
> E-Mail: matthias [dot] goldhoorn [..] ...
>
> Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
>

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On Fri, Oct 25, 2013 at 8:32 PM, Peter Soetens <peter [..] ...> wrote:
> On Fri, Oct 25, 2013 at 9:26 AM, Matthias Goldhoorn
> <matthias [dot] goldhoorn [..] ...> wrote:
>>
>>>>> move it into rtt/impl and make sure that no public header includes
>>>>> it... it's subject to name clashing.
>>>>> maybe name it rtt/impl/CatchConfig.h ?
>>>
>>> @peter, there is currently no rtt/impl folder, should i create a new one
>>> for this or did you mention another one?
>>> (what should impl stay for?)
>>
>> By side this, you find the patch attached. If sou still want that i move the
>> files around please let me know were i should put them.
>> Otherwise everything is worked done you mentioned.
>
> Oops, I meant 'internal' not 'impl'...
>
> The rest looks fine to me...

Except: since it moves into the 'internal' dir, the m_catch_exception
variable and the function also move into that namespace....

Peter

>
> Peter
>
>>
>> Greetings,
>> Matthias
>>
>>
>>
>> --
>> Dipl.-Inf. Matthias Goldhoorn
>> Space and Underwater Robotic
>>
>> Universität Bremen
>> FB 3 - Mathematik und Informatik
>> AG Robotik
>> Robert-Hooke-Straße 5
>> 28359 Bremen, Germany
>>
>> Tel.: +49 421 178 45-4193
>> Zentrale: +49 421 178 45-6550
>> Fax: +49 421 178 45-4150
>> E-Mail: matthias [dot] goldhoorn [..] ...
>>
>> Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
>>

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 25.10.2013 20:49, Peter Soetens wrote:
> On Fri, Oct 25, 2013 at 8:32 PM, Peter Soetens<peter [..] ...> wrote:
>> On Fri, Oct 25, 2013 at 9:26 AM, Matthias Goldhoorn
>> <matthias [dot] goldhoorn [..] ...> wrote:
>>>>>> move it into rtt/impl and make sure that no public header includes
>>>>>> it... it's subject to name clashing.
>>>>>> maybe name it rtt/impl/CatchConfig.h ?
>>>> @peter, there is currently no rtt/impl folder, should i create a new one
>>>> for this or did you mention another one?
>>>> (what should impl stay for?)
>>> By side this, you find the patch attached. If sou still want that i move the
>>> files around please let me know were i should put them.
>>> Otherwise everything is worked done you mentioned.
>> Oops, I meant 'internal' not 'impl'...
>>
>> The rest looks fine to me...
> Except: since it moves into the 'internal' dir, the m_catch_exception
> variable and the function also move into that namespace....
>
> Peter

*done*

please find the updated patch attached ;)

Matthias

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

*pong, still not added to RTT*

On 28.10.2013 13:36, Matthias Goldhoorn wrote:
> On 25.10.2013 20:49, Peter Soetens wrote:
>> On Fri, Oct 25, 2013 at 8:32 PM, Peter
>> Soetens<peter [..] ...> wrote:
>>> On Fri, Oct 25, 2013 at 9:26 AM, Matthias Goldhoorn
>>> <matthias [dot] goldhoorn [..] ...> wrote:
>>>>>>> move it into rtt/impl and make sure that no public header includes
>>>>>>> it... it's subject to name clashing.
>>>>>>> maybe name it rtt/impl/CatchConfig.h ?
>>>>> @peter, there is currently no rtt/impl folder, should i create a
>>>>> new one
>>>>> for this or did you mention another one?
>>>>> (what should impl stay for?)
>>>> By side this, you find the patch attached. If sou still want that i
>>>> move the
>>>> files around please let me know were i should put them.
>>>> Otherwise everything is worked done you mentioned.
>>> Oops, I meant 'internal' not 'impl'...
>>>
>>> The rest looks fine to me...
>> Except: since it moves into the 'internal' dir, the m_catch_exception
>> variable and the function also move into that namespace....
>>
>> Peter
>
> *done*
>
> please find the updated patch attached ;)
>
> Matthias
>
>
>

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

Hello together,
are there still remarks to the patch?

Otherwise i would like really to push this patch to the mainline...

Greetings,
Matthias

Am 13.11.2013 08:29, schrieb Matthias Goldhoorn:
>
> *pong, still not added to RTT*
>
> On 28.10.2013 13:36, Matthias Goldhoorn wrote:
>> On 25.10.2013 20:49, Peter Soetens wrote:
>>> On Fri, Oct 25, 2013 at 8:32 PM, Peter
>>> Soetens<peter [..] ...> wrote:
>>>> On Fri, Oct 25, 2013 at 9:26 AM, Matthias Goldhoorn
>>>> <matthias [dot] goldhoorn [..] ...> wrote:
>>>>>>>> move it into rtt/impl and make sure that no public header includes
>>>>>>>> it... it's subject to name clashing.
>>>>>>>> maybe name it rtt/impl/CatchConfig.h ?
>>>>>> @peter, there is currently no rtt/impl folder, should i create a
>>>>>> new one
>>>>>> for this or did you mention another one?
>>>>>> (what should impl stay for?)
>>>>> By side this, you find the patch attached. If sou still want that
>>>>> i move the
>>>>> files around please let me know were i should put them.
>>>>> Otherwise everything is worked done you mentioned.
>>>> Oops, I meant 'internal' not 'impl'...
>>>>
>>>> The rest looks fine to me...
>>> Except: since it moves into the 'internal' dir, the m_catch_exception
>>> variable and the function also move into that namespace....
>>>
>>> Peter
>>
>> *done*
>>
>> please find the updated patch attached ;)
>>
>> Matthias
>>
>>
>>
>
>

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 17.10.2013 15:15, Sylvain Joyeux wrote:
> On 10/17/2013 03:00 PM, Matthias Goldhoorn wrote:
>> Please find attached a patch that could make the debuggers/developers
>> life much easier.
>> suggestions are welcome.
> I don't like the idea of using a compile-time flag. We should not have
> to rebuild the complete stack each time we want to turn it on.
>
> A global flag on the RTT namespace, set automatically using an
> environment variable would look a lot better to me
>
I changed the patch, that in release build the normal behaviour is active.
On Debug build level, the env export RTT_IGNORE_EXCEPTION could be set
and exceptions rising up...

Suggestions?

Matthias

[Rock-dev] [PATCH] RTT: Added way to disable exception catching

On 18.10.2013 14:00, Matthias Goldhoorn wrote:
> On 17.10.2013 15:15, Sylvain Joyeux wrote:
>> On 10/17/2013 03:00 PM, Matthias Goldhoorn wrote:
>>> Please find attached a patch that could make the debuggers/developers
>>> life much easier.
>>> suggestions are welcome.
>> I don't like the idea of using a compile-time flag. We should not have
>> to rebuild the complete stack each time we want to turn it on.
>>
>> A global flag on the RTT namespace, set automatically using an
>> environment variable would look a lot better to me
>>
> I changed the patch, that in release build the normal behaviour is
> active.
> On Debug build level, the env export RTT_IGNORE_EXCEPTION could be set
> and exceptions rising up...
>
> Suggestions?
>
> Matthias

After a personal Discussion with Sylvain here my current (hopefully
final) patch attached.
Sylvain Requested that the enabling of the new handling becomes
independent of the debug level of RTT.
I added a new define and cmake option for this now.

Greetings,
Matthias

>
>
>