jsparser: print "ERROR" when fail
This commit is contained in:
parent
d4e3c8fa2d
commit
bb46538e89
1 changed files with 2 additions and 0 deletions
|
|
@ -594,6 +594,7 @@ class Widget extends EventEmitter {
|
|||
return typeof r != 'string' ? JSON.stringify(r) : r
|
||||
})
|
||||
} catch (err) {
|
||||
propValue = 'ERROR'
|
||||
console.log(this.getProp('id') + '.' + propName + ': #{} error:\n' + err)
|
||||
}
|
||||
|
||||
|
|
@ -610,6 +611,7 @@ class Widget extends EventEmitter {
|
|||
|
||||
})
|
||||
} catch (err) {
|
||||
propValue = 'ERROR'
|
||||
var stackline = err.stack ? (err.stack.match(/>:([0-9]+):[0-9]+/) || '') : '',
|
||||
line = stackline.length > 1 ? ' at line ' + (parseInt(stackline[1]) - 2) : ''
|
||||
console.log(this.getProp('id') + '.' + propName + ': JS{{}} error:\n' + err + line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue