make sure an element has both code and message tags before treating it

as an exception