This commit is contained in:
Kovid Goyal 2017-05-27 20:58:27 +05:30
parent 4f04afc176
commit 534d06eb4d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -129,7 +129,8 @@ class IframeBoss:
self.encrypted_communications = True self.encrypted_communications = True
def onerror(self, msg, script_url, line_number, column_number, error_object): def onerror(self, msg, script_url, line_number, column_number, error_object):
console.log(error_object) if error_object:
console.log(error_object)
try: try:
fname = script_url.rpartition('/')[-1] or script_url fname = script_url.rpartition('/')[-1] or script_url
msg = msg + '<br><span style="font-size:smaller">' + 'Error at {}:{}:{}'.format(fname, line_number, column_number or '') + '</span>' msg = msg + '<br><span style="font-size:smaller">' + 'Error at {}:{}:{}'.format(fname, line_number, column_number or '') + '</span>'