http://images2.wikia.nocookie.net/__cb20120114034831/broskirev/images/3/38/Okay_face.jpg
On Fri, Feb 10, 2012 at 12:24 PM, Kees Bos <[email protected]> wrote: > 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). -- ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

