Print the important failure messages on iOS even in a non-debug build

It might be that having fprintfs leftover in an app submitted to the
App Store is a no-go, but will fix that then if/when it happens.

Change-Id: Ic671fcce567c655a06fd4ed139100dc9b6f435be
This commit is contained in:
Tor Lillqvist 2014-04-25 12:12:22 +03:00
parent 29c9712b04
commit ab07f81d0b

View File

@ -197,6 +197,10 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
}
if (fp == 0) {
SAL_WARN("cppuhelper", "unknown factory name \"" << name << "\"");
#if defined IOS && !defined SAL_LOG_WARN
// If the above SAL_WARN expanded to nothing, print to stderr...
fprintf(stderr, "Unknown factory name %s\n", OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
#endif
throw css::loader::CannotActivateFactoryException(
"unknown factory name \"" + name + "\"",
css::uno::Reference<css::uno::XInterface>());
@ -217,6 +221,10 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
}
}
SAL_WARN("cppuhelper", "unknown constructor name \"" << constructor << "\"");
#if defined IOS && !defined SAL_LOG_WARN
// If the above SAL_WARN expanded to nothing, print to stderr...
fprintf(stderr, "Unknown constructor name %s\n", OUStringToOString(constructor, RTL_TEXTENCODING_UTF8).getStr());
#endif
throw css::loader::CannotActivateFactoryException(
"unknown constructor name \"" + constructor + "\"",
css::uno::Reference<css::uno::XInterface>());