Bare Exception should be AnnotationError

Create issue
Issue #1877 resolved
Ronan Lamy created an issue
[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@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.

Comments (1)

  1. Log in to comment