Example #1
0
    def __init__(self, **kwargs):
        """Creates a new instance of MarkupTagError."""

        self._errorAtEnd = ArgsUtils.extract("errorAtEnd", False, kwargs)

        ArgsUtils.addIfMissing("errorDef", self.READ_FAILURE, kwargs, True)
        MarkupError.__init__(self, **kwargs)
    def __init__(self, **kwargs):
        """Creates a new instance of MarkupAttributeError."""

        self._attribute         = ArgsUtils.get('attribute', None, kwargs)
        self._attrGroup         = ArgsUtils.get('attributeGroup', None, kwargs)
        self._rawValue          = ArgsUtils.get('rawValue', None, kwargs)
        self._value             = ArgsUtils.get('value', self._rawValue, kwargs)
        self._attrData          = ArgsUtils.get('attributeData', None, kwargs)
        self._attributeSource   = None

        replacements = ArgsUtils.getAsList('replacements', kwargs)
        replacements.append(
            [u'#ATTR#', unicode(self.attribute if self.attribute else u'???')])
        replacements.append(
            [u'#VAL#', unicode(self.value if self.value else u'???')])
        kwargs['replacements'] = replacements

        ArgsUtils.addIfMissing('errorDef', self.INVALID_ATTRIBUTE, kwargs, True)
        MarkupError.__init__(self, **kwargs)
Example #3
0
 def __init__(self, **kwargs):
     ArgsUtils.addIfMissing('errorDef', self.READ_FAILURE, kwargs, True)
     MarkupError.__init__(self, **kwargs)