def error(self, msg, previous=False):
token = self.tokens[self.current_token - <NUM_LIT:1>]<EOL>line_no = self.line<EOL>if previous:<EOL><INDENT>line_no -= <NUM_LIT:1><EOL><DEDENT>line = self.raw[line_no]<EOL>position = token["<STR_LIT:start>"] - self.line_start<EOL>if previous:<EOL><INDENT>position = len(line) + <NUM_LIT:2><EOL><DEDENT>raise ParseException(msg, line, line_no + <NUM_LIT:1>, position, token["<STR_LIT:value>"])<EOL>
Raise a ParseException.
We provide information to help locate the error in the config to allow
easy config debugging for users.  previous indicates that the error
actually occurred at the end of the previous line.