[ECOS] Use of exception and RTTI in application C+ code

Jonathan Larmour jifl@eCosCentric.com
Mon Jan 20 03:20:00 GMT 2003


Raphaël Cotty wrote:
> En réponse à Jonathan Larmour <jifl@eCosCentric.com>:
> 
> 
>>Raphaël Cotty wrote:
>>
>>>Hi,
>>>Is it possible to use exception and/or RTTI in C++ application code
>>
>>?
>>
>>>And if it is, what are the drawbacks ?
>>
>>Not in the current sources, although I have patches to do so - I've
>>never 
>>checked them in yet though as it requires changes to each and every
>>target.
> 
> Ok, but why not ?
> What is the link between the kernel and exception and/or RTTI ?
> Why is it not possible to compile the kernel whithout such options and some parts
> of the application with ?

You need HAL changes regardless - various things need to be set up 
correctly in the first place. It's not to do with the kernel itself.

> In my case I have a set of constructors which can fail with different reasons
> and I need to known them.
> I would feel the use of exception very convenient in that case.

I'm sure. Unfortunately there are quite a list of things I need to do 
first. This may not make it for 2.0.

In the meantime, you should probably just set the state of some variable 
you pass into the constructor, or some global or per-thread state when a 
constructor fails. Not ideal I know.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list