From ab07f81d0b5ffc4297d5f15d2458c5cc9217800f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 25 Apr 2014 12:12:22 +0300 Subject: [PATCH] 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 --- cppuhelper/source/shlib.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index 9218581ff005..debbdb08c33c 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -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()); @@ -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());