human
Complete the below
def Error(msg):

    ''''Helper class to raise parser errors.'
    '''
 What is a the Python code you requested?
assistant
#Here is the Python code you requested.
    def raise_error(s, loc, toks):
        raise ParseFatalException(((msg + '\n') + s))
    empty = Empty()
    empty.setParseAction(raise_error)
    return empty