Hi,
I remember i changed my source code last year to catch the exception:
try {
return PackageInformationProvider.get(xComponentContext)
.getPackageLocation(identifier);
} catch (final java.lang.Exception e) {
Log.error(e);
}
cause catching uno exceptions didn't work
found: Package Information Provider may deliver wrong urls
https://issues.apache.org/ooo/show_bug.cgi?id=113752 ?
regards
Oliver
Am 24.02.2014 07:36 schrieb Keith Alcock:
> OpenOffice API experts,
>
> I've inherited code for an OpenOffice extension in C++ that
> purportedly ran with a previous version of OpenOffice who knows how
> long ago. The code is throwing an exception. It is presently being
> built with Visual C++ 2008 and running under Windows 7, although I
> doubt that either of those is the problem. By the time the exception
> is caught, it is of type com::sun::star::uno::Exception & with the
> message "[context="user"] caught unexpected exception!". However,
> previous to that the debugger sees a
> com::sun::star::ucb::InteractiveAugmentedIOException, an 'anonymous
> namespace'::NoDescriptionException, a few
> com::sun::star::ucb::InteractiveAugmentedIOException's, and a
> com::sun::star::lang::WrappedTargetRuntimeException.
>
> The code is below. I believe that it is preparing to load a graphic
> from the extension's installation directory. Perhaps there is an
> alternate way to do that now. Any and all help would be appreciated.
> Thanks.
>
> OUString getPathToExtensionRoot(const char* name) {
> OUString ouName = OUString::createFromAscii(name);
> // localContext seems to be good. It can be used for other things.
> Reference<XComponentContext> localContext =
> defaultBootstrap_InitialComponentContext();
> Reference<XPackageInformationProvider> xPackageInformationProvider =
> PackageInformationProvider::get(localContext);
> // The following line crashes as does any other call using ->
> // xPackageInfoProvider.is() reports 1
> try {
> OUString path =
> xPackageInformationProvider->getPackageLocation(ouName);
> return path;
> }
> catch (Exception &ex) {
> }
> return ouName; // just to return something
> }
>
> ---------------------------------------------------------------------
> 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]