diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /io/source/acceptor | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'io/source/acceptor')
-rw-r--r-- | io/source/acceptor/acc_pipe.cxx | 6 | ||||
-rw-r--r-- | io/source/acceptor/acc_socket.cxx | 12 | ||||
-rw-r--r-- | io/source/acceptor/acceptor.cxx | 6 |
3 files changed, 10 insertions, 14 deletions
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 6ba5606f86b0..7d4cd93319bf 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -160,7 +160,7 @@ namespace io_acceptor if( ! m_pipe.is() ) { OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName; - throw ConnectionSetupException( error, Reference< XInterface > () ); + throw ConnectionSetupException( error ); } } @@ -174,7 +174,7 @@ namespace io_acceptor if( ! pipe.is() ) { OUString error = "io.acceptor: pipe already closed" + m_sPipeName; - throw ConnectionSetupException( error, Reference< XInterface > () ); + throw ConnectionSetupException( error ); } PipeConnection *pConn = new PipeConnection( m_sConnectionDescription ); @@ -193,7 +193,7 @@ namespace io_acceptor else { OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName; - throw ConnectionSetupException( error, Reference< XInterface > ()); + throw ConnectionSetupException( error ); } } diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index 9146757a4ef8..936116f93c74 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -335,16 +335,14 @@ namespace io_acceptor { OUStringBuffer message( 128 ); message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid tcp/ip port " ); message.append( (sal_Int32) m_nPort ); - throw ConnectionSetupException( - message.makeStringAndClear() , Reference< XInterface> () ); + throw ConnectionSetupException( message.makeStringAndClear() ); } if( ! m_addr.setHostname( m_sSocketName.pData ) ) { OUStringBuffer message( 128 ); message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid host " ); message.append( m_sSocketName ); - throw ConnectionSetupException( - message.makeStringAndClear(), Reference< XInterface > () ); + throw ConnectionSetupException( message.makeStringAndClear() ); } m_socket.setOption( osl_Socket_OptionReuseAddr, 1); @@ -353,9 +351,7 @@ namespace io_acceptor { OUStringBuffer message( 128 ); message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - couldn't bind on " ); message.append( m_sSocketName ).appendAscii( ":" ).append((sal_Int32)m_nPort); - throw ConnectionSetupException( - message.makeStringAndClear(), - Reference<XInterface>()); + throw ConnectionSetupException( message.makeStringAndClear() ); } if(! m_socket.listen() ) @@ -363,7 +359,7 @@ namespace io_acceptor { OUStringBuffer message( 128 ); message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - can't listen on " ); message.append( m_sSocketName ).appendAscii( ":" ).append( (sal_Int32) m_nPort); - throw ConnectionSetupException( message.makeStringAndClear(),Reference<XInterface>() ); + throw ConnectionSetupException( message.makeStringAndClear() ); } } diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx index 49d3feef50aa..761515a502dd 100644 --- a/io/source/acceptor/acceptor.cxx +++ b/io/source/acceptor/acceptor.cxx @@ -108,7 +108,7 @@ namespace io_acceptor { OUString sMessage( "AlreadyAcceptingException :" ); sMessage += sConnectionDescription; - throw AlreadyAcceptingException( sMessage , Reference< XInterface > () ); + throw AlreadyAcceptingException( sMessage ); } *m_pFlag = true; } @@ -138,7 +138,7 @@ namespace io_acceptor { // instantiate another acceptor for different ports OUString sMessage = "acceptor::accept called multiple times with different conncetion strings\n"; - throw ConnectionSetupException( sMessage, Reference< XInterface > () ); + throw ConnectionSetupException( sMessage ); } if( m_sLastDescription.isEmpty() ) @@ -219,7 +219,7 @@ namespace io_acceptor OUString message("Acceptor: unknown delegatee "); message += delegatee; - throw ConnectionSetupException(message, Reference<XInterface>()); + throw ConnectionSetupException(message); } } } |