Simple code for thread.
Simple code of exceptions.