693 self._dbgClient.progTerminated(excval.code) |
693 self._dbgClient.progTerminated(excval.code) |
694 return |
694 return |
695 |
695 |
696 if exctype in [SyntaxError, IndentationError]: |
696 if exctype in [SyntaxError, IndentationError]: |
697 try: |
697 try: |
698 message, (filename, linenr, charnr, text) = excval |
698 if type(excval) == tuple: |
|
699 message, (filename, lineno, charno, text) = excval |
|
700 else: |
|
701 message = excval.msg |
|
702 filename = excval.filename |
|
703 lineno = excval.lineno |
|
704 charno = excval.offset |
|
705 if charno is None: |
|
706 charno = 0 |
|
707 |
|
708 exclist = [message, [filename, lineno, charno]] |
|
709 filename = os.path.abspath(filename) |
|
710 realSyntaxError = os.path.exists(filename) |
699 except ValueError: |
711 except ValueError: |
700 exclist = [] |
712 exclist = [] |
701 realSyntaxError = True |
713 realSyntaxError = True |
702 else: |
|
703 exclist = [message, [filename, linenr, charnr]] |
|
704 realSyntaxError = os.path.exists(filename) |
|
705 |
714 |
706 if realSyntaxError: |
715 if realSyntaxError: |
707 self._dbgClient.write("%s%s\n" % (ResponseSyntax, |
716 self._dbgClient.write("%s%s\n" % (ResponseSyntax, |
708 unicode(exclist))) |
717 unicode(exclist))) |
709 self._dbgClient.eventLoop() |
718 self._dbgClient.eventLoop() |