On Sun, Feb 12, 2012 at 11:01 AM, Vsevolod Fedorov
<[email protected]> wrote:
> On 02/10/12 09:27, Gustaf Nilsson wrote
>> 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??
>>
> Hi gustaf
>
> I did something similar to this some time ago:
> I catch (hopefuly) every pyjamas error and report it to server, with
> error message and traceback.
> It is not very straightforward, and sometime traceback is wrong or lost,
> but sometimes it useful.
> And I suspect this is not the 'right' way.
> I attached my source. Used like this:
> ---
>    def initPyjsErrors( self ):
>        setOnPyjsError(self.onPyjsError)
>
>    def onPyjsError( self, msg, url, linenumber ):
>        print 'pyjs error: msg=%r, url=%r, line=%r' % (msg, url, linenumber)
>        _, trace = getPyjsError()
>        self.handleInternalError(msg, trace)
> ---
> Seva

 folks, will you _please_ when you create things like this _tell_
people, and get it into the pyjamas codebase.  that's what a community
is: it's when people pull together to improve the codebase not just
for themselves but for _everyone_.

 l.

Reply via email to