On 6 July 2012 03:34, Dag Sverre Seljebotn wrote:
>
>
> mark florisson wrote:
>
>>On 5 July 2012 21:46, Dag Sverre Seljebotn
>>wrote:
>>>
>>>
>>> mark florisson wrote:
>>>
On 3 July 2012 20:15, Robert Bradshaw wrote:
> On Tue, Jul 3, 2012 at 11:43 AM, Dag Sverre Seljebotn
> wrote:
Thanks for the follow up Stefan,
On Jul 06, 2012, at 06:48 AM, Stefan Behnel wrote:
>This is very weird behaviour indeed. I wouldn't know why that should
>happen. What "return as_bytes.decode('utf-8')" does is that is calls
>strlen() to see how long the string is, then it calls the UTF-8 decode
>
So if you have code like the following:
cdef class Database:
cdef open(self, path) except +raise_py_error:
something_that_can_throw_a_cpp_exception(path)
you can write
cdef int raise_py_error():
raise Something
to kind of turn a C++ exception into a Python exception. The proble
Barry Warsaw wrote:
>So if you have code like the following:
>
>cdef class Database:
>cdef open(self, path) except +raise_py_error:
>something_that_can_throw_a_cpp_exception(path)
>
>you can write
>
>cdef int raise_py_error():
>raise Something
>
>to kind of turn a C++ exception
On Jul 06, 2012, at 11:59 PM, Dag Sverre Seljebotn wrote:
>>The generated code does a `catch(...)` so you lose that useful information.
>>AFAICT, there's no way to find out within the catch clause (or anything
>>called by that clause) what C++ exception occurred.
>
>But that requires something mor
Barry Warsaw, 06.07.2012 19:14:
> So if you have code like the following:
>
> cdef class Database:
> cdef open(self, path) except +raise_py_error:
> something_that_can_throw_a_cpp_exception(path)
>
> you can write
>
> cdef int raise_py_error():
> raise Something
>
> to kind of t
Barry Warsaw, 06.07.2012 16:21:
> Thanks for the follow up Stefan,
>
> On Jul 06, 2012, at 06:48 AM, Stefan Behnel wrote:
>
>> This is very weird behaviour indeed. I wouldn't know why that should
>> happen. What "return as_bytes.decode('utf-8')" does is that is calls
>> strlen() to see how long t
On Fri, Jul 6, 2012 at 3:05 PM, Barry Warsaw wrote:
> On Jul 06, 2012, at 11:59 PM, Dag Sverre Seljebotn wrote:
>
>>>The generated code does a `catch(...)` so you lose that useful information.
>>>AFAICT, there's no way to find out within the catch clause (or anything
>>>called by that clause) what