You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcmis/0035-coverity-honor-excepti...

49 lines
1.4 KiB

From fd2bd50813350811c9882d81117152f5cad5d9b5 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 2 Mar 2016 07:52:10 +0100
Subject: [PATCH 35/37] coverity: honor exception specs
---
src/libcmis/http-session.cxx | 6 ++++++
src/libcmis/http-session.hxx | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx
index 2a5d6b2..9bbb9bd 100644
--- a/src/libcmis/http-session.cxx
+++ b/src/libcmis/http-session.cxx
@@ -773,11 +773,17 @@ string HttpSession::getRefreshToken( ) throw ( libcmis::Exception )
}
void HttpSession::oauth2Refresh( )
+ throw ( CurlException )
+try
{
m_inOAuth2Authentication = true;
m_oauth2Handler->refresh( );
m_inOAuth2Authentication = false;
}
+catch ( const libcmis::Exception& e )
+{
+ throw CurlException( e.what() );
+}
void HttpSession::initProtocols( )
{
diff --git a/src/libcmis/http-session.hxx b/src/libcmis/http-session.hxx
index 245e00b..22827db 100644
--- a/src/libcmis/http-session.hxx
+++ b/src/libcmis/http-session.hxx
@@ -169,7 +169,7 @@ class HttpSession
private:
void checkCredentials( ) throw ( CurlException );
void checkOAuth2( std::string url ) throw ( CurlException );
- void oauth2Refresh( );
+ void oauth2Refresh( ) throw ( CurlException );
void initProtocols( );
};
--
2.5.0