HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Lib/site-packages/fontTools/ufoLib/errors.py
from __future__ import annotations


class UFOLibError(Exception):
    pass


class UnsupportedUFOFormat(UFOLibError):
    pass


class GlifLibError(UFOLibError):
    def _add_note(self, note: str) -> None:
        # Loose backport of PEP 678 until we only support Python 3.11+, used for
        # adding additional context to errors.
        # TODO: Replace with https://docs.python.org/3.11/library/exceptions.html#BaseException.add_note
        (message, *rest) = self.args
        self.args = ((message + "\n" + note), *rest)


class UnsupportedGLIFFormat(GlifLibError):
    pass