cheking exception class