Added example how to handle exceptions in threads.