aditya kumar pandey wrote:
Hi
I have been writing programs using OpenOffice SDK (1.9.113) for a while
now. I am not able to catch exceptions. So I wrote a small program. And
even their exceptions are not caught!
I have tested this with OO 1.9.113 on a Red Hat Fedora Core 3, and a Red
Hat 9 machine.
Reference Example:
OpenOffice.org2.0_SDK/examples/cpp/counter
I added this code at the end of main function
try
{
throw (new com::sun::star::uno::Exception);
}
catch (com::sun::star::uno::Exception e)
{
}
catch (...)
{}
Am I doing something wrong?
The Linux x86 OOo 1.9.x versions built by Sun contain a problematic
libgcc_s.so.1 which causes the problem you describe: If some code is
compiled with a GCC other than the exact version used inside Sun and
then run in an environment where the problematic libgcc_s.so.1 is used,
chances are high that exception handling within that code does not work.
See also <http://gcc.gnu.org/ml/gcc/2005-05/msg00965.html>.
The workaround is to use the libgcc_s.so.1 that comes with your GCC,
either by replacing the file in the OOo program directory, or by using
LD_PRELOAD.
By the way, the URE comes with a fixed libgcc_s.so.1 (and I currently
cannot remember why we do not use the fixed libgcc_s.so.1 for OOo, too,
but I will try to track that down again).
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]