Hi,
- Remove all calls of the---dangerous anyway---cppu::getCaughtException
from the OOo code base
(<http://lxr.go-oo.org/ident?i=getCaughtException> lists "245 references
in 102 files").
well the question would be how to do it, you need to offer the same
functionality, because the code relies on it. When I got it right, just
the rethrow causes the problem, correct (if also catching c++ exception
in the UNO bridge layer fails, all bridges won't work either) ?
Well my C++ knowledge is a little rotten, but I think you could change
this by getting a cppu layer into the stack. Code like this
Any anException;
try
{
// do something
}
catch ( Exception &e )
{
anException = ::cppu::getCaughtException();
}
could be changed with a helper
--------- snip -----
// IDL
interface XExceptionHelper : XInterface
{
void invoke();
}
// CPPU
namespace cppu
{
// do similar cppu magic here as in current getCaughtException()
Any catchException( const Reference< XExceptionHelper > & ref );
}
--------snap -----
into this code :
--------- snip -----
// declare a uno helper
class MyExceptionCatcher : public
cppu::WeakComponentImplHelper1<XExceptionHelper>
{
private:
virtual void invoke() { // do something here }
};
// exceute the code ...
Reference< XExceptionHelper > holder( new MyExceptionHelper() );
anException = cppu::catchException( holder );
if( anException.hasValue() )
{
// exception occured
}
else
{
// all went fine
}
--------snap -----
so replacing all occurences might be a valid solution. The work depends
on how much is done within the try{} block (and how many reference to
local variables are used which all must be passed and reextracted from
the self written ExceptionHelper) ...
> Have your pick, folks. (Or, have a beer; its Friday after all...)
well I think a beer is quite right now :-).
Bye,
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]