Aaarg I think I got the answer myself... "If you use Yield, you'll have to use yield for everything because your function becomes a generator."
So, how, if possible, could I get the error displayed inside a generator function using yield? On 14 déc, 20:58, je <[email protected]> wrote: > http://webpy.org/cookbook/streaming_large_files > (more readable) > > On 14 déc, 20:53, je <[email protected]> wrote: > > > Sure. > > But, when using web.py and as I read on the homepage, yield is > > supposed to replace print, which was used to return data (in a non > > blocking way). > > > example:http://webpy.org/cookbook/streaming_large_files?m=diff&b=2 > > > On 14 déc, 20:36, "W. Martin Borgert" <[email protected]> wrote: > > > > Quoting je <[email protected]>: > > > > > I should have mentionned the code here is a sample to show the > > > > problem, and that err1() and err2() (which don't exist) are supposed > > > > to fail and raise an error. > > > > > The error from err1() is displayed, but the error from err2() is not. > > > > Have you tried the same code without web.py, i.e. just as an > > > ordinary Python function? I assume, you will have the same > > > situation, so this probably not web.py related. (I didn't try.) -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
