1
2
3class VoltLibError(Exception):
4    def __init__(self, message, location):
5        Exception.__init__(self, message)
6        self.location = location
7
8    def __str__(self):
9        message = Exception.__str__(self)
10        if self.location:
11            path, line, column = self.location
12            return "%s:%d:%d: %s" % (path, line, column, message)
13        else:
14            return message
15