code: function getFilePath (str) {
      var hasRoot = /^[a-z]:/i.exec(str)
      var colonLeftIndex = 0
      if (hasRoot) {
        colonLeftIndex = hasRoot[0].length
      }
      var pathEnd = str.split('\n')[0].indexOf(':', colonLeftIndex)
      if (pathEnd === -1) {
        // invalid string, return non-formattable result
        return null
      }
      return str.substring(0, pathEnd)
    }
docs: get a file path from the error message