Generate more informative exception terms when an invalid `encoding/1` directive is found