Ticket #56 (closed enhancement: fixed)

Opened 16 months ago

Last modified 5 months ago

better debug js error handling

Reported by: f.taby Owned by: zeank
Priority: normal Milestone: jsjac-1.3.2
Component: jsjac Version: svn trunk
Severity: normal Keywords: error, js
Cc:

Description

When setting debug level to 1, i can see my own JS Error. Cool. Now i'd like to have line number and file if available.

So in src/JSJaCConnection.js, function JSJaCConnection.prototype._handleEvent, actualy there is

 } catch (e) { this.oDbg.log(aEvent.handler+"\n>>>"+e.name+": "+ e.message,1); } 

I suggest update with

 } catch (e) { 
        if (e.fileName&&e.lineNumber) {
            this.oDbg.log(aEvent.handler+"\n>>>"+e.name+": "+ e.message+' in '+e.fileName+' line '+e.lineNumber,1);    
        } else {
            this.oDbg.log(aEvent.handler+"\n>>>"+e.name+": "+ e.message,1);             
        }
      } 

Change History

Changed 16 months ago by f.taby

and eEvent.handler, when using bind, is always the bind function, so showing aEvent.handler is not usefull

Changed 12 months ago by zeank

  • status changed from new to closed
  • resolution set to fixed

fixed at r512

Changed 5 months ago by sim

decoration Changed 1 year ago by admin

bathtub Changed 1 year ago by admin

solar system Changed 1 year ago by admin

stair parts Changed 1 year ago by admin

solar supply Changed 1 year ago by admin

Note: See TracTickets for help on using tickets.