try except inside exec

David Stanek dstanek at dstanek.com
Fri May 29 13:07:44 EDT 2009


On Fri, May 29, 2009 at 11:55 AM, Michele Petrazzo
<michele.petrazzo at remove_me_unipex.it> wrote:
>
> My goal is to execute a function received from a third-part, so I cannot
> modify as you made in your first piece of code.
> I want a "clean" exception with the real line code/tb so I can show a "real"
> error message. This means that the try/execpt has to include the passed
> function and catch every possible exception.
>
> Do you have any ideas on how can I figure this out?
>

Is the thirdparty function the entire STR or just the a_funct part?

-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek



More information about the Python-list mailing list