lib/parsers.js
function setCulprit (payload) {
  if (payload.culprit) return // skip if user provided a custom culprit
  var frames = payload.stacktrace.frames
  var filename = frames[0].filename
  var fnName = frames[0].function
  for (var n = 0; n < frames.length; n++) {
    if (frames[n].in_app) {
      filename = frames[n].filename
      fnName = frames[n].function
      break
    }
  }
  payload.culprit = filename ? fnName + ' (' + filename + ')' : fnName
}
function setCulprit (payload) {
  if (payload.culprit) return // skip if user provided a custom culprit
  var frames = payload.stacktrace.frames
  var filename = frames[0].filename
  var fnName = frames[0].function
  for (var n = 0; n < frames.length; n++) {
    if (frames[n].in_app) {
      filename = frames[n].filename
      fnName = frames[n].function
      break
    }
  }
  payload.culprit = filename ? fnName + ' (' + filename + ')' : fnName
}
function setCulprit ( payload ) { if ( payload . culprit ) return // skip if user provided a custom culprit var frames = payload . stacktrace . frames var filename = frames [ 0 ] . filename var fnName = frames [ 0 ] . function for ( var n = 0 ; n < frames . length ; n ++ ) { if ( frames [ n ] . in_app ) { filename = frames [ n ] . filename fnName = frames [ n ] . function break } } payload . culprit = filename ? fnName + ' (' + filename + ')' : fnName }
Default `culprit` to the top of the stack or the highest `in_app` frame if such exists
Default culprit to the top of the stack or the highest in_app frame if such exists