From f8226e87b446d96a3803df46d9b786c233d1e1f5 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 9 Jul 2014 12:04:35 -0400 Subject: Pass a useful exception message. Change-Id: Idde024a7b6896571d159c3983ef1985fa12d0c5a --- comphelper/source/misc/storagehelper.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'comphelper/source') diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 0c60a7c54bd1..51ee8c51762b 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -45,6 +45,7 @@ #include +#include using namespace ::com::sun::star; @@ -274,7 +275,13 @@ sal_Int32 OStorageHelper::GetXStorageFormat( else { // the mediatype is not known - throw beans::IllegalTypeException(); + OUString aMsg(BOOST_CURRENT_FUNCTION); + aMsg += ":"; + aMsg += OUString::number(__LINE__); + aMsg += ": unknown media type '"; + aMsg += aMediaType; + aMsg += "'"; + throw beans::IllegalTypeException(aMsg); } return nResult; -- cgit