From 5722b815fa34422595407e83029fb41583f13894 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 11 Apr 2017 15:39:56 +0200 Subject: sw: let getProperty fail more helpfully Change-Id: Ibca942235060c5b3a6215325e262bacbc464f2a4 --- sw/qa/extras/inc/swmodeltestbase.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index c4cbeebad1d3..e2ce0f5a9cd8 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -425,7 +425,9 @@ protected: T data; if (!css::uno::fromAny(properties->getPropertyValue(name), &data)) { - CPPUNIT_FAIL("the property is of unexpected type or void"); + OString const msg("the property is of unexpected type or void: " + + OUStringToOString(name, RTL_TEXTENCODING_UTF8)); + CPPUNIT_FAIL(msg.getStr()); } return data; } @@ -437,7 +439,9 @@ protected: T data = T(); if (!(properties->getPropertyValue(name) >>= data)) { - CPPUNIT_FAIL("the property is of unexpected type or void"); + OString const msg("the property is of unexpected type or void: " + + OUStringToOString(name, RTL_TEXTENCODING_UTF8)); + CPPUNIT_FAIL(msg.getStr()); } return data; } -- cgit