summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-07-02 14:13:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-07-02 14:56:52 +0200
commita9fc9f4a9f20fdcc00bf1860fe8445b130b1d736 (patch)
tree3c22ae05969537f6939ced70088877c491397d16 /framework
parentb6df953c8fb19cd00aed47b95b28677e34892f59 (diff)
Drop unused E_NOEXCEPTIONS
Change-Id: I558684352cc99002752d4c5d118a0c46572bd6f0
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/threadhelp/transactionguard.hxx2
-rw-r--r--framework/inc/threadhelp/transactionmanager.hxx2
-rw-r--r--framework/source/fwi/threadhelp/transactionmanager.cxx68
3 files changed, 36 insertions, 36 deletions
diff --git a/framework/inc/threadhelp/transactionguard.hxx b/framework/inc/threadhelp/transactionguard.hxx
index 4395a5872316..81930e2683c7 100644
--- a/framework/inc/threadhelp/transactionguard.hxx
+++ b/framework/inc/threadhelp/transactionguard.hxx
@@ -54,7 +54,7 @@ class TransactionGuard : private boost::noncopyable
from different threads at the same time ... this class use no refcount mechanism!
@param "rManager" reference to transaction manager for using to register a request
@param "eMode" enable/disable throwing of exceptions for rejected calls
- @param "eReason" returns reason for rejected calls if "eMode=E_NOEXCEPTIONS"!
+ @param "eReason" returns reason for rejected calls
*//*-*****************************************************************************************************/
inline TransactionGuard( TransactionManager& rManager, EExceptionMode eMode, ERejectReason* eReason = NULL )
: m_pManager( &rManager )
diff --git a/framework/inc/threadhelp/transactionmanager.hxx b/framework/inc/threadhelp/transactionmanager.hxx
index d89896e21155..8d87a512fbd0 100644
--- a/framework/inc/threadhelp/transactionmanager.hxx
+++ b/framework/inc/threadhelp/transactionmanager.hxx
@@ -68,7 +68,6 @@ enum ERejectReason
e.g. We can throw a DisposedException if user try to work and our mode is E_CLOSE!
But sometimes he dont need this feature - will handle it by himself.
Then we must differ between some exception-modi:
- E_NOEXCEPTIONS We never throw any exceptions! User handle it private and looks for ERejectReason.
E_HARDEXCEPTIONS We throw exceptions for all working modes different from E_WORK!
E_SOFTEXCEPTIONS We throw exceptions for all working modes different from E_WORK AND E_INCLOSE!
This mode is useful for impl-methods which should be callable from dispose() method!
@@ -96,7 +95,6 @@ enum ERejectReason
*//*-*************************************************************************************************************/
enum EExceptionMode
{
- E_NOEXCEPTIONS ,
E_HARDEXCEPTIONS,
E_SOFTEXCEPTIONS
};
diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx
index 77a4894c65db..e68086282add 100644
--- a/framework/source/fwi/threadhelp/transactionmanager.cxx
+++ b/framework/source/fwi/threadhelp/transactionmanager.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cassert>
+
#include <threadhelp/transactionmanager.hxx>
#include <macros/generic.hxx>
@@ -57,8 +61,8 @@ TransactionManager::~TransactionManager()
E_BEFORECLOSE : The object start the closing mechanism ... but sometimes
e.g. the dispose() method need to call some private methods.
- These some special methods should use E_SOFTEXCEPTIONS or ignore
- E_INCLOSE as returned reason for E_NOEXCEPTIONS to detect this special case!
+ These some special methods should use E_SOFTEXCEPTIONS
+ to detect this special case!
E_CLOSE : Object is already dead! All further requests will be refused.
It's your decision to react in a right way.
@@ -150,7 +154,7 @@ EWorkingMode TransactionManager::getWorkingMode() const
@seealso method unregisterTransaction()
@param "eMode" ,used to enable/disable throwing exceptions automatically for rejected calls
- @param "eReason" ,reason for rejected calls if eMode=E_NOEXCEPTIONS
+ @param "eReason" ,reason for rejected calls
*//*-*****************************************************************************************************/
void TransactionManager::registerTransaction( EExceptionMode eMode, ERejectReason& eReason ) throw( css::uno::RuntimeException, css::lang::DisposedException )
{
@@ -245,37 +249,35 @@ bool TransactionManager::isCallRejected( ERejectReason& eReason ) const
*//*-*****************************************************************************************************/
void TransactionManager::impl_throwExceptions( EExceptionMode eMode, ERejectReason eReason ) const throw( css::uno::RuntimeException, css::lang::DisposedException )
{
- if( eMode != E_NOEXCEPTIONS )
+ switch( eReason )
{
- switch( eReason )
- {
- case E_UNINITIALIZED : if( eMode == E_HARDEXCEPTIONS )
- {
- // Help programmer to find out, why this exception is thrown!
- SAL_WARN( "fwk", "TransactionManager...: Owner instance not correctly initialized yet. Call was rejected! Normally it's an algorithm error ... wrong use of class!" );
- //ATTENTION: temp. disabled - till all bad code positions are detected and changed! */
- // throw css::uno::RuntimeException( "TransactionManager...\nOwner instance not right initialized yet. Call was rejected! Normaly it's an algorithm error ... wrong usin of class!\n", css::uno::Reference< css::uno::XInterface >() );
- }
- break;
- case E_INCLOSE : if( eMode == E_HARDEXCEPTIONS )
- {
- // Help programmer to find out, why this exception is thrown!
- SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!" );
- }
- break;
- case E_CLOSED : {
- // Help programmer to find out, why this exception is thrown!
- SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!" );
- }
- case E_NOREASON : {
- // Help programmer to find out
- SAL_WARN( "fwk", "TransactionManager...: Impossible case E_NOREASON!" );
- }
- break;
- default: break; // nothing to do
- }
+ case E_UNINITIALIZED : if( eMode == E_HARDEXCEPTIONS )
+ {
+ // Help programmer to find out, why this exception is thrown!
+ SAL_WARN( "fwk", "TransactionManager...: Owner instance not correctly initialized yet. Call was rejected! Normally it's an algorithm error ... wrong use of class!" );
+ //ATTENTION: temp. disabled - till all bad code positions are detected and changed! */
+ // throw css::uno::RuntimeException( "TransactionManager...\nOwner instance not right initialized yet. Call was rejected! Normaly it's an algorithm error ... wrong usin of class!\n", css::uno::Reference< css::uno::XInterface >() );
+ }
+ break;
+ case E_INCLOSE : if( eMode == E_HARDEXCEPTIONS )
+ {
+ // Help programmer to find out, why this exception is thrown!
+ SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!" );
+ }
+ break;
+ case E_CLOSED : {
+ // Help programmer to find out, why this exception is thrown!
+ SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!" );
+ }
+ case E_NOREASON : {
+ // Help programmer to find out
+ SAL_WARN( "fwk", "TransactionManager...: Impossible case E_NOREASON!" );
+ }
+ break;
+ default:
+ assert(false);
}
}