diff -r 9e99a96d6ac3 Lib/code.py --- a/Lib/code.py Sat Jun 11 13:19:34 2016 -0700 +++ b/Lib/code.py Sat Jun 11 19:34:06 2016 -0400 @@ -62,7 +62,7 @@ """ try: code = self.compile(source, filename, symbol) - except (OverflowError, SyntaxError, ValueError): + except Exception: # Issue 25733: 7 possible exceptions # Case 1 self.showsyntaxerror(filename) return False diff -r 9e99a96d6ac3 Lib/idlelib/pyshell.py --- a/Lib/idlelib/pyshell.py Sat Jun 11 13:19:34 2016 -0700 +++ b/Lib/idlelib/pyshell.py Sat Jun 11 19:34:06 2016 -0400 @@ -650,7 +650,7 @@ source = fp.read() try: code = compile(source, filename, "exec") - except (OverflowError, SyntaxError): + except Exception: # Issue 25733: 7 possible exceptions self.tkconsole.resetoutput() print('*** Error in script or command!\n' 'Traceback (most recent call last):', diff -r 9e99a96d6ac3 Lib/idlelib/runscript.py --- a/Lib/idlelib/runscript.py Sat Jun 11 13:19:34 2016 -0700 +++ b/Lib/idlelib/runscript.py Sat Jun 11 19:34:06 2016 -0400 @@ -98,10 +98,10 @@ try: # If successful, return the compiled code return compile(source, filename, "exec") - except (SyntaxError, OverflowError, ValueError) as value: - msg = getattr(value, 'msg', '') or value or "" - lineno = getattr(value, 'lineno', '') or 1 - offset = getattr(value, 'offset', '') or 0 + except Exception as value: # Issue 25733: 7 possible exceptions + msg = value.args[0] or value or "" + lineno = getattr(value, 'lineno', 1) or 1 + offset = getattr(value, 'offset', 0) or 0 if offset == 0: lineno += 1 #mark end of offending line pos = "0.0 + %d lines + %d chars" % (lineno-1, offset-1)