2015-05-02 04:17:00 +00:00
|
|
|
class RenderError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class FileAccessDenied(RenderError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class ParseException(Exception):
|
2015-06-18 16:12:11 +00:00
|
|
|
|
2015-05-02 04:17:00 +00:00
|
|
|
def __init__(self, msg, s, col):
|
|
|
|
Exception.__init__(self)
|
|
|
|
self.msg = msg
|
|
|
|
self.s = s
|
|
|
|
self.col = col
|
|
|
|
|
|
|
|
def marked(self):
|
2015-05-30 00:03:13 +00:00
|
|
|
return "%s\n%s" % (self.s, " " * (self.col - 1) + "^")
|
2015-05-02 04:17:00 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
2015-05-30 00:03:13 +00:00
|
|
|
return "%s at char %s" % (self.msg, self.col)
|