Neal Becker wrote:
> Neal Becker wrote:
>
>> Has behavior of c++ exception changed with boost::python + python3?
>>
>> I used to simply use throw from c++. Now I get:
>> SystemError: initialization of ldpc_45 raised unreported exception
>>
>> I believe this exception was really:
>> if (!fp)
>> throw std::runtime_error ((boost::format ("fopen %1% failed") %
>> name).str());
>>
>> which would have produced a good error message under python2.6.
>
> I think this difference in behavior is for an exception thrown
> during module initialization?
>
> A c++ exception thrown after initialization seems to behave as before.
Just confirmed, under python2.6 I get my nice error message:
Traceback (most recent call last):
File "test_btr_equal_coded.py", line 570, in <module>
run (sys.argv[1:])
File "test_btr_equal_coded.py", line 148, in run
from ldpc_45 import encoder, decoder, N, K
RuntimeError: fopen H23_64800_7-50_3-50_3.dat failed
But on python3.1.2 I just get
SystemError: initialization of ldpc_45 raised unreported exception
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig