From 3ddfcd70dccd1d8312d6172014f01862cd5be1ab Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Wed, 20 Aug 2014 18:33:04 +0200 Subject: make debug builds fail hard on unexpected conditions Change-Id: I0732ce65757ee29e5ad12cb576c5b64ed0edeaee --- connectivity/source/commontools/DateConversion.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'connectivity/source') diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 979884580b2f..0e31e4f1cb84 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -261,7 +261,19 @@ void DBTypeConversion::setValue(const Reference& xVariant, css::lang::Locale loc; if (xFormatProps->getPropertyValue("Locale") >>= loc) nStandardKey = xFormatTypes->getStandardIndex(loc); + else + { + assert(false); + } } + else + { + SAL_WARN("connectivity.commontools", "no format by key " << nKeyToUse); + } + } + else + { + assert(false); } // Why use nStandardKey rather than nKeyToUse here? I'm not sure, but "it was always like that". // Previously had hardcoded 0 instead of nStandardKey, which led to problems with dates -- cgit