code: function sendError(msg, file, line, col, err) {
          var errString = 'JSON not found';
          if (window.JSON) {
              errString = JSON.stringify(err);
          }
  
          if (typeof(msg) === 'object') {
              file      = msg.filename;
              line      = msg.lineno;
              col       = msg.colno;
              errString = msg.error.stack;
              msg       = msg.message;
          }
  
          new Image().src = pathServerAPI + 'jserrors?msg=' + encodeURIComponent(msg) + '&file=' + encodeURIComponent(file) + '&line=' + encodeURIComponent(line) + '&col=' + encodeURIComponent(col) + '&err=' + encodeURIComponent(errString);
      }
docs: Отправка javascript-ошибки
  
  @param {string} msg
  @param {string} file
  @param {string} line
  @param {string} col
  @param {string} err
  
  @version 15.11.2018
  @author  Дмитрий Щербаков <atomcms@ya.ru>