[C++-sig] What's wrong here? (BPL V2)

David Abrahams david.abrahams at rcn.com
Fri Jun 14 04:33:39 CEST 2002


From: "Dominic Sacré" <bugcreator at gmx.de>


On Friday 14 June 2002 02:44, David Abrahams wrote:
> <<Ah, you're right, it's indeed an exception I didn't catch:
> ReferenceError: Attempt to return dangling internal reference>>
>
> That's still strange. What was the context? The built-in
> handle_exception() function should have converted this to something
> visible in Python.

<<Well, I don't use handle_exception(), at least not directly.
I'm embedding Python in a C++ program, and not vice versa.>>

That explains everything. It's clear to me that we'll need to start
thinking your way as well pretty soon. Until then, thanks for blazing the
trail!

<< I'm not quite
sure what the correct way to handle exceptions is in this case, but the
"usual" way won't work.>>

Yah. There's no single correct approach for that scenario.

<<Whoops :O
No wonder that handle<> didn't help... But borrow() solves the problem
indeed, the extractor works now!>>

Great!







More information about the Cplusplus-sig mailing list