fix class task exception raising