Testing After Successful Joins
You should test for an exception each time you successfully join with a runnable, as shown in
Example 7.
Example 7 – Testing for an exception after joining with a runnable
RWThreadFunction myThread = ...;
try {
myThread.start(); // Start the runnable
myThread.join(); // Join the runnable
myThread.raise(); // Rethrow any exception that was caught!
}
catch(RWTHRxmsg& msg) {
cout << "Exception! " << msg.why() << endl;
}