Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/test
In directory sc8-pr-cvs1:/tmp/cvs-serv22602/src/test
Modified Files:
TestException.cpp
Log Message:
24/12/2003 Barbeaux
* Implemented Mutex and Condition.
* Implemented a ThreadException.
* Added origin message into Exception handler.
Index: TestException.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/test/TestException.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- TestException.cpp 24 Dec 2003 10:49:48 -0000 1.1
+++ TestException.cpp 24 Dec 2003 11:52:49 -0000 1.2
@@ -36,19 +36,16 @@
/** This test tries to launch an exception
* and to catch it. Then it displays the message
* sent by the exception before exiting. */
- cout << "Start of TestException" <<endl;
+ //cout << "Start of TestException" <<endl;
try {
- cout << " Create a ThreadException" << endl;
- ThreadError error = MutexError;
- ThreadException excp(error,"Mutex isn't initialized");
- cout << " Throws exception" << endl;
- throw excp;
- cout << " Exception hasn't been thrown" << endl;
+ //cout << "Throws exception" << endl;
+ throw ThreadException(MutexError, "MutexError test", "TestException::run");
+ //cout << "Exception hasn't been thrown" << endl;
}
catch(Exception& e) {
- cout << " Exception catched" << endl;
- // displays the exception message
- cout << " " << e.getMessage() << endl;
+ //cout << "Exception catched" << endl;
+ // display the exception message
+ cout << e.getMessage() << endl;
}
- cout << "End of TestException" << endl;
+ //cout << "End of TestException" << endl;
}
|