[pypy-issue] Issue #1877: Bare Exception should be AnnotationError (pypy/pypy)

Ronan Lamy issues-reply at bitbucket.org
Tue Sep 30 16:37:47 CEST 2014


New issue 1877: Bare Exception should be AnnotationError
https://bitbucket.org/pypy/pypy/issue/1877/bare-exception-should-be-annotationerror

Ronan Lamy:

```
[translation:info]    File "/home/ronan/dev/pypy/rpython/annotator/bookkeeper.py", line 338, in immutablevalue
[translation:info]     raise Exception("Don't know how to represent %r" % (x,))
[translation:ERROR] Exception: Don't know how to represent <property object at 0x2091730>
[translation:ERROR] Processing block:
[translation:ERROR]  block at 99 is a <class 'rpython.flowspace.flowcontext.SpamBlock'>
[translation:ERROR]  in (hippy.module.phar.phar:208)phar_construct
[translation:ERROR]  containing the following operations:
[translation:ERROR]        v16 = simple_call((type LocalPath), v15)
[translation:ERROR]        v17 = getattr(this_0, ('filename'))
[translation:ERROR]        v18 = simple_call((function create_file), v17, ('r'))
[translation:ERROR]        v19 = getattr(v18, ('read'))
[translation:ERROR]        v20 = simple_call(v19)
[translation:ERROR]        v21 = getattr(v16, ('ext'))
[translation:ERROR]        v22 = eq(v21, ('.bz2'))
[translation:ERROR]        v23 = bool(v22)
[translation:ERROR]  --end--

```
The error message is actually OK, but this should be an AnnotationError anyway, perhaps with some explicit mention of the fact that properties aren't RPython.





More information about the pypy-issue mailing list