(self, e)
Handle a BASIC error through error message.
Handle a BASIC error through error message.
Handle a BASIC error through error message .
def _handle_error(self, e):
        """Handle a BASIC error through error message."""
        # not handled by ON ERROR, stop execution
        self.console.start_line()
        self.console.write(e.get_message(self.program.get_line_number(e.pos)))
        self.interpreter.set_parse_mode(False)
        self.interpreter.input_mode = False
        # special case: syntax error
        if e.err == error.STX:
            # for some reason, err is reset to zero by GW-BASIC in this case.
            self.interpreter.error_num = 0
            if e.pos is not None and e.pos != -1:
                # line edit gadget appears
                self._edit_prompt = (self.program.get_line_number(e.pos), e.pos+1)
def _handle_error ( self , e ) : # not handled by ON ERROR, stop execution self . console . start_line ( ) self . console . write ( e . get_message ( self . program . get_line_number ( e . pos ) ) ) self . interpreter . set_parse_mode ( False ) self . interpreter . input_mode = False # special case: syntax error if e . err == error . STX : # for some reason, err is reset to zero by GW-BASIC in this case. self . interpreter . error_num = 0 if e . pos is not None and e . pos != - 1 : # line edit gadget appears self . _edit_prompt = ( self . program . get_line_number ( e . pos ) , e . pos + 1 )