Skip to content

exceptions

TODO:

Classes:

  • Error

    Base class for rdflib exceptions.

  • ParserError

    RDF Parser error.

  • UniquenessError

    A uniqueness assumption was made in the context, and that is not true

__all__ module-attribute

__all__ = ['Error', 'ParserError', 'UniquenessError']

Error

Error(msg: Optional[str] = None)

Bases: Exception

Base class for rdflib exceptions.

Attributes:

Source code in rdflib/exceptions.py
def __init__(self, msg: Optional[str] = None):
    Exception.__init__(self, msg)
    self.msg = msg

msg instance-attribute

msg = msg

ParserError

ParserError(msg: str)

Bases: Error

RDF Parser error.

Methods:

Attributes:

  • msg (str) –
Source code in rdflib/exceptions.py
def __init__(self, msg: str):
    Error.__init__(self, msg)
    self.msg: str = msg

msg instance-attribute

msg: str = msg

__str__

__str__() -> str
Source code in rdflib/exceptions.py
def __str__(self) -> str:
    return self.msg

UniquenessError

UniquenessError(values: Any)

Bases: Error

A uniqueness assumption was made in the context, and that is not true

Source code in rdflib/exceptions.py
    def __init__(self, values: Any):
        Error.__init__(
            self,
            "\
Uniqueness assumption is not fulfilled. Multiple values are: %s"
            % values,
        )