stacktrace
  var stack = error && error.stack;
  // Ghetto stacktrace
  if (!stack) {
    stack = msg + '\n   at ' + url + ':' + line;
    if (col) {
      stack += ':' + col;
    }
  }
  // Append user agent info
  stack += '\n\nUser Agent: ' + navigator.userAgent;
  // Print error to the page
  var errorRoot = document.getElementById('FatalError');
  var errorStack = document.getElementById('FatalError__stack');
  if (errorRoot) {
    errorRoot.className = 'FatalError';
    errorStack.textContent = stack;