Assign a message to ClassCastException exceptions