Changeset 3487:ee5067bdf0b1 in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/11/08 17:25:47 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Remove another bunch of unused exception classes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xsc.py

    r3484 r3487  
    377377        else: 
    378378            return "no global attribute with class %r" % self.name 
    379  
    380  
    381 class AmbiguousNodeError(Error, LookupError): 
    382     """ 
    383     Exception that is raised, when an node class is ambiguous (most commonly 
    384     for processing instructions or entities) 
    385     """ 
    386  
    387     type = "node" 
    388  
    389     def __init__(self, name, xml=False): 
    390         self.name = name 
    391         self.xml = xml 
    392  
    393     def __str__(self): 
    394         return "%s with %s name %s is ambigous" % (self.type, ("Python", "XML")[self.xml], self.name) 
    395  
    396  
    397 class AmbiguousProcInstError(AmbiguousNodeError): 
    398     type = "procinst" 
    399  
    400  
    401 class AmbiguousEntityError(AmbiguousNodeError): 
    402     type = "entity" 
    403  
    404  
    405 class AmbiguousCharRefError(AmbiguousNodeError): 
    406     type = "charref" 
    407  
    408     def __str__(self): 
    409         if isinstance(self.name, (int, long)): 
    410             return "%s with codepoint %s is ambigous" % (self.type, self.name) 
    411         else: 
    412             return AmbiguousNodeError.__str__(self) 
    413379 
    414380