Coverage for /usr/lib/python3/dist-packages/fontTools/feaLib/error.py: 36%
14 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
1class FeatureLibError(Exception):
2 def __init__(self, message, location):
3 Exception.__init__(self, message)
4 self.location = location
6 def __str__(self):
7 message = Exception.__str__(self)
8 if self.location:
9 return f"{self.location}: {message}"
10 else:
11 return message
14class IncludedFeaNotFound(FeatureLibError):
15 def __str__(self):
16 assert self.location is not None
18 message = (
19 "The following feature file should be included but cannot be found: "
20 f"{Exception.__str__(self)}"
21 )
22 return f"{self.location}: {message}"