Add TagError type, which reports detailed information about errors.  Add error checking convenience methods.