xref: /aosp_15_r20/external/fonttools/Lib/fontTools/voltLib/error.py (revision e1fe3e4ad2793916b15cccdc4a7da52a7e1dd0e9)
1class VoltLibError(Exception):
2    def __init__(self, message, location):
3        Exception.__init__(self, message)
4        self.location = location
5
6    def __str__(self):
7        message = Exception.__str__(self)
8        if self.location:
9            path, line, column = self.location
10            return "%s:%d:%d: %s" % (path, line, column, message)
11        else:
12            return message
13