ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx | 38 +++++++++++------------ ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx | 2 - 2 files changed, 20 insertions(+), 20 deletions(-)
New commits: commit e668c2a88f0edb41169a76d9c6203227cd436559 Author: Michael Stahl <[email protected]> AuthorDate: Wed Oct 6 14:24:34 2021 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Mon Nov 1 18:19:10 2021 +0100 ucb: webdav-curl: catch exception by constant reference [ replicate commit e4ce7225dd987f9b2f250f055d9688de79931444 ] Change-Id: I9727af7b85a7f4c0a821a41856d72644b306ba29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123173 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx index bf043e533892..3ac379c9da70 100644 --- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx @@ -189,7 +189,7 @@ void DAVResourceAccess::PROPFIND( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -229,7 +229,7 @@ void DAVResourceAccess::PROPFIND( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ) ; } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -267,7 +267,7 @@ void DAVResourceAccess::PROPPATCH( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -307,7 +307,7 @@ void DAVResourceAccess::HEAD( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -345,7 +345,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -385,7 +385,7 @@ void DAVResourceAccess::GET( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -427,7 +427,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -471,7 +471,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( xEnv, m_aURL ), rRequestHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -515,7 +515,7 @@ void DAVResourceAccess::GET( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -598,7 +598,7 @@ void DAVResourceAccess::PUT( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -652,7 +652,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -714,7 +714,7 @@ void DAVResourceAccess::POST( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -757,7 +757,7 @@ void DAVResourceAccess::MKCOL( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -798,7 +798,7 @@ void DAVResourceAccess::COPY( aHeaders, xEnv ), bOverwrite ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -839,7 +839,7 @@ void DAVResourceAccess::MOVE( aHeaders, xEnv ), bOverwrite ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -875,7 +875,7 @@ void DAVResourceAccess::DESTROY( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -914,7 +914,7 @@ void DAVResourceAccess::LOCK( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -949,7 +949,7 @@ void DAVResourceAccess::UNLOCK( new DAVAuthListener_Impl( xEnv, m_aURL ), aHeaders, xEnv ) ); } - catch ( DAVException & e ) + catch (DAVException const& e) { errorCount++; bRetry = handleException( e, errorCount ); @@ -1078,7 +1078,7 @@ void DAVResourceAccess::resetUri() } -bool DAVResourceAccess::handleException( DAVException & e, int errorCount ) +bool DAVResourceAccess::handleException(DAVException const& e, int const errorCount) { switch ( e.getError() ) { diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx index 783727f6cb84..639e22e29611 100644 --- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx @@ -197,7 +197,7 @@ private: /// @throws DAVException bool detectRedirectCycle(::std::u16string_view rRedirectURL); /// @throws DAVException - bool handleException( DAVException & e, int errorCount ); + bool handleException(DAVException const& e, int errorCount); /// @throws DAVException void initialize(); };
