On Fri, 2012-02-10 at 05:27 +0000, Gustaf Nilsson wrote:
> Hi
> 
> Lying awake at 5:22 in the morning because of jetlag and just realised
> how hilarious itd be to create a faux BSOD in my app if anything went
> wrong instead of it just freezing or showing the javascript error +
> traceback. My first thought was to just have a try: on the main loop,
> but just realised pyjs apps dont have a main loop (?)
> 
> So where would i catch any error that could happen within my app? will
> i have to add my try: to every method of every object??
> 

There's no loop. All is event driven. One could think of adding some
handler to the exception thrower, but that won't work, since lots of
exceptions are (meant to be) catch. So, you'll have to catch in ever
atomic part of code (i.e. all code that can be run by event).

Reply via email to