code: def raise_error(self, message, *params, **key_params):
          
          
          s = 'Parser error in '
  
          self.xml_node_stack.reverse()
          if len(self.xml_node_stack) > 1:
              node = self.xml_node_stack[0]
              s += '<{0}'.format(node.tag)
              if 'name' in node.lattrib:
                  s += ' name=\"{0}\"'.format(node.lattrib['name'])
              if 'id' in node.lattrib:
                  s += ' id=\"{0}\"'.format(node.lattrib['id'])
              s += '>'
  
          for node in self.xml_node_stack[1:]:
              s += '.<{0}'.format(node.tag)
              if 'name' in node.lattrib:
                  s += ' name=\"{0}\"'.format(node.lattrib['name'])
              if 'id' in node.lattrib:
                  s += ' id=\"{0}\"'.format(node.lattrib['id'])
              s += '>'
  
          s += ':\n  ' + message
  
          raise ParseError(s, *params, **key_params)
  
          self.xml_node_stack.reverse()
docs: Raise a parse error.