729 self._dbgClient.progTerminated(excval.code) |
729 self._dbgClient.progTerminated(excval.code) |
730 return |
730 return |
731 |
731 |
732 if exctype in [SyntaxError, IndentationError]: |
732 if exctype in [SyntaxError, IndentationError]: |
733 try: |
733 try: |
734 printerr("1") |
|
735 message = str(excval) |
734 message = str(excval) |
736 filename = excval.filename |
735 filename = excval.filename |
737 linenr = excval.lineno |
736 lineno = excval.lineno |
738 charnr = excval.offset |
737 charno = excval.offset |
739 if charno is None: |
738 if charno is None: |
740 charno = 0 |
739 charno = 0 |
|
740 |
|
741 exclist = [message, [filename, lineno, charno]] |
|
742 filename = os.path.abspath(filename) |
|
743 realSyntaxError = os.path.exists(filename) |
741 except (AttributeError, ValueError): |
744 except (AttributeError, ValueError): |
742 exclist = [] |
745 exclist = [] |
743 realSyntaxError = True |
746 realSyntaxError = True |
744 else: |
|
745 exclist = [message, [filename, linenr, charnr]] |
|
746 realSyntaxError = os.path.exists(filename) |
|
747 |
747 |
748 if realSyntaxError: |
748 if realSyntaxError: |
749 self._dbgClient.write("{0}{1}\n".format( |
749 self._dbgClient.write("{0}{1}\n".format( |
750 ResponseSyntax, str(exclist))) |
750 ResponseSyntax, str(exclist))) |
751 self._dbgClient.eventLoop() |
751 self._dbgClient.eventLoop() |