improve error handling and logging
This commit is contained in:
parent
a6594f142b
commit
cebfae6430
1 changed files with 3 additions and 3 deletions
6
dist/static/assets/webcam.js
vendored
6
dist/static/assets/webcam.js
vendored
|
@ -457,12 +457,12 @@ if (event.reason && event.reason.message && event.reason.stack){
|
|||
|
||||
(function(){
|
||||
const oldLog = console.log;
|
||||
console.log = function () {
|
||||
oldLog.apply(console, arguments);
|
||||
console.log = function (...params) {
|
||||
oldLog.apply(console, params);
|
||||
|
||||
const err = new Error();
|
||||
const logSrc = err.stack.split("\n")[1];
|
||||
const args = arguments.map((a) => ""+a); // to string
|
||||
const args = params.map((a) => ""+a); // to string
|
||||
window.parent.postMessage([{
|
||||
log: [{
|
||||
method: 'log',
|
||||
|
|
Loading…
Reference in a new issue