summaryrefslogtreecommitdiff
path: root/extensions/workben
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-04 11:26:15 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-04 11:26:15 +0000
commit4fca3aac0b46ac0d29bccb474eb7b85f5fece34b (patch)
tree7ece8bf29931571e21e339c38ed9a40ae17a0fb6 /extensions/workben
parent22a82ee70fd831660ca0196080edce9132de848a (diff)
INTEGRATION: CWS ooo20031216 (1.2.126); FILE MERGED
2003/12/28 12:08:35 waratah 1.2.126.1: #i23913# remove TRY CATCH macros
Diffstat (limited to 'extensions/workben')
-rw-r--r--extensions/workben/pythonautotest.cxx12
-rw-r--r--extensions/workben/pythontest.cxx10
-rw-r--r--extensions/workben/testcomponent.cxx26
3 files changed, 22 insertions, 26 deletions
diff --git a/extensions/workben/pythonautotest.cxx b/extensions/workben/pythonautotest.cxx
index 7608fa1eed0b..7beac900b708 100644
--- a/extensions/workben/pythonautotest.cxx
+++ b/extensions/workben/pythonautotest.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pythonautotest.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:20:26 $
+ * last change: $Author: hr $ $Date: 2004-02-04 12:25:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -507,16 +507,16 @@ int __LOADONCALLAPI main (int argc, char **argv)
// check exception handling !
{
- TRY {
+ try {
xInvoke->invoke( L"foo" , Sequence<UsrAny>(1) , Sequence<INT16>(), Sequence<UsrAny> () );
// wrong number of arguments
assert( 0 );
}
- CATCH ( IllegalArgumentException , e ) {
+ catch ( IllegalArgumentException& e ) {
}
- CATCH ( InvocationTargetException , e ) {
+ catch ( InvocationTargetException& e ) {
}
- CATCH ( CannotConvertException , e ) {
+ catch ( CannotConvertException& e ) {
// empty any cannot be converted
}
}
diff --git a/extensions/workben/pythontest.cxx b/extensions/workben/pythontest.cxx
index 27cfe7340d8c..82a756f5cae2 100644
--- a/extensions/workben/pythontest.cxx
+++ b/extensions/workben/pythontest.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pythontest.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:20:37 $
+ * last change: $Author: hr $ $Date: 2004-02-04 12:25:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -332,14 +332,14 @@ void CmdDebugger::cmdLine()
}
else if( ! strncmp( pcLine , "idv" , 3) ) {
- TRY {
+ try {
UsrAny any = (*m_pInvokationRef)->getValue( PCHAR_TO_USTRING( &(pcLine[4]) ) );
dumpVarToStream( &(pcLine[4]) , any , stderr );
}
- CATCH(UnknownPropertyException,e) {
+ catch(UnknownPropertyException& e ) {
fprintf( stderr, "UnknownPropertyException\n" );
}
- CATCH(IllegalArgumentException,e) {
+ catch(IllegalArgumentException& e ) {
fprintf( stderr, "IllegalArgumentException\n" );
}
}
diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx
index 4766dfc33e22..c3bec6ad4997 100644
--- a/extensions/workben/testcomponent.cxx
+++ b/extensions/workben/testcomponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: testcomponent.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:20:48 $
+ * last change: $Author: hr $ $Date: 2004-02-04 12:26:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,7 +121,7 @@ int __LOADONCALLAPI main (int argc, char **argv)
XImplementationRegistrationRef xReg;
XSimpleRegistryRef xSimpleReg;
- TRY {
+ try {
// Create registration service
XInterfaceRef x = xSMgr->createInstance(
UString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) );
@@ -133,16 +133,15 @@ int __LOADONCALLAPI main (int argc, char **argv)
assert( xSimpleReg.is() );
xSimpleReg->open( L"testcomp.rdb" , FALSE , TRUE );
*/ }
- CATCH( Exception ,e ) {
+ catch( Exception& e ) {
printf( "%s\n" , OWStringToOString( e.getName() , CHARSET_SYSTEM ).getStr() );
exit(1);
}
- END_CATCH;
sal_Char szBuf[1024];
OString sTestName;
- TRY {
+ try {
// Load dll for the tested component
for( int n = 2 ; n <argc ; n ++ ) {
ORealDynamicLoader::computeModuleName( argv[n] , szBuf, 1024 );
@@ -154,16 +153,15 @@ int __LOADONCALLAPI main (int argc, char **argv)
xSimpleReg );
}
}
- CATCH( Exception, e ) {
+ catch( Exception& e ) {
printf( "Couldn't reach dll %s\n" , szBuf );
printf( "%s\n" , OWStringToOString( e.getName() , CHARSET_SYSTEM ).getStr() );
exit(1);
}
- END_CATCH;
- TRY {
+ try {
// Load dll for the test component
sTestName = "test";
sTestName += argv[2];
@@ -175,12 +173,11 @@ int __LOADONCALLAPI main (int argc, char **argv)
aDllName,
xSimpleReg );
}
- CATCH( Exception , e ) {
+ catch( Exception& e ) {
printf( "Couldn't reach dll %s\n" , szBuf );
printf( "%s\n" , OWStringToOString( e.getName() , CHARSET_SYSTEM ).getStr() );
exit(1);
}
- END_CATCH;
// Instantiate test service
@@ -212,19 +209,18 @@ int __LOADONCALLAPI main (int argc, char **argv)
}
// do the test
- TRY {
+ try {
nNewHandle = xTest->test( OStringToOWString( argv[1] , CHARSET_SYSTEM ) , x , nHandle );
}
- CATCH ( Exception , e ) {
+ catch ( Exception& e ) {
printf( "testcomponent : uncaught exception %s\n" ,
OWStringToOString( e.getName(), CHARSET_SYSTEM ).getStr() );
exit(1);
}
- AND_CATCH_ALL() {
+ catch(...) {
printf( "testcomponent : uncaught unknown exception\n" );
exit(1);
}
- END_CATCH;
// print errors and warning