Add method to checking messages in exception.