add three methods to deal with thread exception