To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=81297





------- Additional comments from [EMAIL PROTECTED] Thu Oct 11 08:01:21 +0000 
2007 -------
Strange problem ...

The (modified) code where the problem happens is as follows:
  OSL_TRACE( "preparing" );
  try
  {
     xMasterStatement = m_xConnection->prepareStatement(sql);
  }
  catch( const ::com::sun::star::sdbc::SQLException& )
  {
    throw;
  }
  catch( const Exception& )
  {
    Any aCaught( ::cppu::getCaughtException() );

    ::rtl::OUString sCaughtName( aCaught.getValueTypeName() );

    ::rtl::OString sTrace( sCaughtName.getStr(),
    sCaughtName.getLength(), RTL_TEXTENCODING_ASCII_US );
    OSL_TRACE( "caught: %s", sTrace.getStr() );

    OSL_TRACE( "re-throwing" );
    throw;
  }
  OSL_TRACE( "prepared" );

This gives me the following output:

  preparing
  caught: com.sun.star.sdbc.SQLException

and then crashs with "unexpected", which according to dbx'es "help
intercept" means that an exception is thrown within a method, where the
method's exception specification does not allow this exception.

Two things which completely baffle me here:
1. Why isn't the exception caught in the first catch-branch?
2. Actually, the code is inside a method which *does* allow to throw
   a css.sdbc.SQLException. Why does throwing it result in an
   "unexpected"?

One thing which I strongly suspect is involved here:
m_xConnection is a proxy (created by a css.reflection.ProxyFactory) to
another object implemented in C++. AFAIK, those proxies internally use
the C UNO binding - which means that every exception thrown in the
proxied object is translated twice.

Somehow it tastes as if this translation is wrong, but I don't know
enough about Solaris, RTTI, compiler building, the C UNO bridge, and the
like, to have an idea what's going on here.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to