summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorRMZeroFour <ritobroto04@gmail.com>2024-03-24 23:00:34 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2024-03-30 13:32:16 +0100
commit599b113b732190749385293a9fbc8ffc3e618556 (patch)
tree4b8a067f5ba09b97a2fda6cf434fb86fa652307b /svl
parent13250e1aa589453534d113442da1ac8a2cbb71b9 (diff)
tdf#42982 Add error messages to thrown exceptions
As part of the efforts in #42982 to improve the UNO API error reporting, this commit adds error messages in several files to help improve debugging experience. Change-Id: I7a51d4fd1e3a57798d70bc3464b034649948a287 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165253 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'svl')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 90b27c29f7b0..68afc328935d 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1222,7 +1222,7 @@ sal_Bool SAL_CALL PasswordContainer::hasMasterPassword( )
std::unique_lock aGuard( mMutex );
if ( !m_xStorageFile )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("storage file not set");
OUString aEncodedMP, aEncodedMPIV;
return ( m_xStorageFile->useStorage() && m_xStorageFile->getEncodedMasterPassword( aEncodedMP, aEncodedMPIV ) );
@@ -1233,7 +1233,7 @@ sal_Bool SAL_CALL PasswordContainer::allowPersistentStoring( sal_Bool bAllow )
std::unique_lock aGuard( mMutex );
if ( !m_xStorageFile )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("storage file not set");
if ( !bAllow )
removeMasterPassword(aGuard);
@@ -1250,7 +1250,7 @@ sal_Bool SAL_CALL PasswordContainer::isPersistentStoringAllowed()
std::unique_lock aGuard( mMutex );
if ( !m_xStorageFile )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("storage file not set");
return m_xStorageFile->useStorage();
}
@@ -1312,7 +1312,7 @@ sal_Bool SAL_CALL PasswordContainer::isDefaultMasterPasswordUsed()
std::unique_lock aGuard( mMutex );
if ( !m_xStorageFile )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("storage file not set");
OUString aEncodedMP, aEncodedMPIV;
return ( m_xStorageFile->useStorage() && m_xStorageFile->getEncodedMasterPassword( aEncodedMP, aEncodedMPIV ) && aEncodedMP.isEmpty() );