unhandled exception question

2007-05-25 Thread joshusdog
I'm working on a test application that embeds the Python interpreter. I have the following problem... I've created my own interactive interpreter loop. Essentially, it reads the command from the prompt and calls the following C code: PyObject* pMainModule = PyImport_AddModule("__main__");

Re: Exception question

2005-05-15 Thread Steven Bethard
Ron Adam wrote: > I had read somewhere that exception objects were global, but that wasn't > correct, after testing it, they appear to be part of the local frame. So > once a function exits, any exceptions objects that happened inside the > function are no longer retrievable. > > And checking e

Re: Exception question

2005-05-15 Thread Ron Adam
Steven Bethard wrote: > Ron Adam wrote: > >>Do exceptions that take place get stored in a stack or list someplace? > > [snip] > >>I know I can catch the error and store it myself with, >> >>except Exception, exc: >> >>or possibly, >> >>errlist = [] >>errlist.append(sys.exc_info()) >>

Re: Exception question

2005-05-14 Thread Steven Bethard
Ron Adam wrote: > > Do exceptions that take place get stored in a stack or list someplace? [snip] > I know I can catch the error and store it myself with, > > except Exception, exc: > > or possibly, > > errlist = [] > errlist.append(sys.exc_info()) > > But what I want to know is do

Exception question

2005-05-14 Thread Ron Adam
I'm trying to understand exception handling better and have a question I haven't been able to find an answer too. Which probably means It won't work, but... Do exceptions that take place get stored in a stack or list someplace? For example in: try: try: try: riskyf