framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 14 +++++++--- framework/source/uiconfiguration/uiconfigurationmanager.cxx | 14 +++++++--- 2 files changed, 20 insertions(+), 8 deletions(-)
New commits: commit 3976f115ef539171e4b165c8d610ab7b49764f15 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> diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 19f6ce0af138..aa94300e6154 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1295,15 +1295,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 ) @@ -1363,7 +1368,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 98a3a7faa729..17a585b210a3 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1005,15 +1005,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 ) @@ -1052,7 +1057,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