summaryrefslogtreecommitdiff
path: root/extensions/test/stm/pipetest.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-04 11:25:19 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-04 11:25:19 +0000
commit22a82ee70fd831660ca0196080edce9132de848a (patch)
tree2082853d312c316cd49b7d96ef00484b7674ee0f /extensions/test/stm/pipetest.cxx
parent9cd8adc68ff7766cbbc5830413a3064e9c502bcd (diff)
INTEGRATION: CWS ooo20031216 (1.2.126); FILE MERGED
2003/12/28 12:02:37 waratah 1.2.126.1: #i23913# remove TRY CATCH macros
Diffstat (limited to 'extensions/test/stm/pipetest.cxx')
-rw-r--r--extensions/test/stm/pipetest.cxx25
1 files changed, 11 insertions, 14 deletions
diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx
index 76209111c71f..60e7c8f0c896 100644
--- a/extensions/test/stm/pipetest.cxx
+++ b/extensions/test/stm/pipetest.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pipetest.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:20:15 $
+ * last change: $Author: hr $ $Date: 2004-02-04 12:25:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -221,7 +221,7 @@ INT32 OPipeTest::test( const UString& TestName,
UsrSystemException) )
{
if( L"com.sun.star.io.Pipe" == TestName ) {
- TRY {
+ try {
if( 0 == hTestHandle ) {
testInvariant( TestName , TestObject );
}
@@ -235,13 +235,12 @@ INT32 OPipeTest::test( const UString& TestName,
testMultithreading( TestObject );
}
}
- CATCH( Exception , e ) {
+ catch( Exception& e ) {
BUILD_ERROR( 0 , UStringToString( e.getName() , CHARSET_SYSTEM ).GetCharStr() );
}
- AND_CATCH_ALL() {
+ catch(...) {
BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" );
}
- END_CATCH;
hTestHandle ++;
@@ -334,26 +333,24 @@ void OPipeTest::testSimple( const XInterfaceRef &r )
output->closeOutput();
- TRY {
+ try {
output->writeBytes( Sequence<BYTE> (100) );
ERROR_ASSERT( 0 , "writing on a closed stream does not cause an exception" );
}
- CATCH (IOException , e ) {
+ catch (IOException& e ) {
e; // just to suppress warning during compile
}
- END_CATCH;
ERROR_ASSERT(! input->readBytes( seqRead , 1 ), "eof not found !" );
input->closeInput();
- TRY {
+ try {
input->readBytes( seqRead , 1 );
ERROR_ASSERT( 0 , "reading from a closed stream does not cause an exception" );
}
- CATCH( IOException , e ) {
+ catch( IOException& e ) {
e; // just to suppress warning during compile
}
- END_CATCH;
}
@@ -429,7 +426,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
}
/* {
- TRY {
+ try {
XInterfaceRef x = xSMgr->createInstance( strService );
XInputStreamRef input( x , USR_QUERY );
@@ -443,7 +440,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
}
}
- CATCH( IOException , e ) {
+ catch( IOException& e ) {
printf( "%s %s\n" , UStringToString( e.getName() , CHARSET_SYSTEM ).GetCharStr() ,
UStringToString( e.Message , CHARSET_SYSTEM ).GetCharStr() );
}