[pypy-svn] r63287 - pypy/trunk/pypy/translator/platform
afa at codespeak.net
afa at codespeak.net
Tue Mar 24 19:01:57 CET 2009
Author: afa
Date: Tue Mar 24 19:01:56 2009
New Revision: 63287
Modified:
pypy/trunk/pypy/translator/platform/__init__.py
Log:
Be a little more verbose when printing error messages
5 lines are often not enough.
Also account for the Microsoft compilers printing compilation errors to stdout.
Modified: pypy/trunk/pypy/translator/platform/__init__.py
==============================================================================
--- pypy/trunk/pypy/translator/platform/__init__.py (original)
+++ pypy/trunk/pypy/translator/platform/__init__.py Tue Mar 24 19:01:56 2009
@@ -32,7 +32,10 @@
self.err = err.replace('\r\n', '\n')
def __repr__(self):
- return "<CompilationError err=%s>" % safe_repr._repr(self.err)
+ if self.err:
+ return "<CompilationError err=%s>" % safe_repr._repr(self.err)
+ else:
+ return "<CompilationError out=%s>" % safe_repr._repr(self.out)
__str__ = __repr__
@@ -100,9 +103,9 @@
errorfile = outname.new(ext='errors')
errorfile.write(stderr)
stderrlines = stderr.splitlines()
- for line in stderrlines[:5]:
+ for line in stderrlines[:20]:
log.ERROR(line)
- if len(stderrlines) > 5:
+ if len(stderrlines) > 20:
log.ERROR('...')
raise CompilationError(stdout, stderr)
More information about the Pypy-commit
mailing list