framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 14 +++++++--- framework/source/uiconfiguration/uiconfigurationmanager.cxx | 14 +++++++--- 2 files changed, 20 insertions(+), 8 deletions(-)
New commits: commit fc0b37ad4a80b7826b1a3b83f70ebb0e1107df7d Author: Muhammet Kara <muhammet.k...@pardus.org.tr> Date: Mon Aug 21 22:47:47 2017 +0300 Add some exception messages to the removeSettings method in UIConfigurationManager and ModuleUIConfigurationManager Change-Id: I82c5369dc43dc8ccd9be62acaf327a39f3b4d68f Reviewed-on: https://gerrit.libreoffice.org/41403 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 3976f115ef539171e4b165c8d610ab7b49764f15) Reviewed-on: https://gerrit.libreoffice.org/41420 Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 1bb4119e5387..4391212a11eb 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1296,15 +1296,20 @@ void SAL_CALL ModuleUIConfigurationManager::removeSettings( const OUString& Reso if (( nElementType == css::ui::UIElementType::UNKNOWN ) || ( nElementType >= css::ui::UIElementType::COUNT )) - throw IllegalArgumentException(); + throw IllegalArgumentException( "The ResourceURL is not valid or " + "describes an unknown type. " + "ResourceURL: " + ResourceURL, nullptr, 0 ); else if ( m_bReadOnly ) - throw IllegalAccessException(); + throw IllegalAccessException( "The configuration manager is read-only. " + "ResourceURL: " + ResourceURL, nullptr ); else { SolarMutexClearableGuard aGuard; if ( m_bDisposed ) - throw DisposedException(); + throw DisposedException( "The configuration manager has been disposed, " + "and can't uphold its method specification anymore. " + "ResourceURL: " + ResourceURL, nullptr ); UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); if ( pDataSettings ) @@ -1364,7 +1369,8 @@ void SAL_CALL ModuleUIConfigurationManager::removeSettings( const OUString& Reso } } else - throw NoSuchElementException(); + throw NoSuchElementException( "The settings data cannot be found. " + "ResourceURL: " + ResourceURL, nullptr ); } } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 8419dac29b02..a7d90efa0ce1 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1004,15 +1004,20 @@ void SAL_CALL UIConfigurationManager::removeSettings( const OUString& ResourceUR if (( nElementType == css::ui::UIElementType::UNKNOWN ) || ( nElementType >= css::ui::UIElementType::COUNT )) - throw IllegalArgumentException(); + throw IllegalArgumentException( "The ResourceURL is not valid or " + "describes an unknown type. " + "ResourceURL: " + ResourceURL, nullptr, 0 ); else if ( m_bReadOnly ) - throw IllegalAccessException(); + throw IllegalAccessException( "The configuration manager is read-only. " + "ResourceURL: " + ResourceURL, nullptr ); else { SolarMutexClearableGuard aGuard; if ( m_bDisposed ) - throw DisposedException(); + throw DisposedException( "The configuration manager has been disposed, " + "and can't uphold its method specification anymore. " + "ResourceURL: " + ResourceURL, nullptr ); UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); if ( pDataSettings ) @@ -1051,7 +1056,8 @@ void SAL_CALL UIConfigurationManager::removeSettings( const OUString& ResourceUR } } else - throw NoSuchElementException(); + throw NoSuchElementException( "The settings data cannot be found. " + "ResourceURL: " + ResourceURL, nullptr); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits