exceptionWithRawStackTrace.js 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. export function ExceptionWithRawStackTrace(params = {}) {
  2. return {
  3. platform: 'javascript',
  4. entries: [
  5. {
  6. type: 'exception',
  7. data: {
  8. values: [
  9. {
  10. type: 'ReferenceError',
  11. value: 'methodDoesNotExist is not defined',
  12. stacktrace: {
  13. frames: [
  14. {
  15. function: 'sentryWrapped',
  16. module: '@sentry/browser/esm/helpers',
  17. filename: './node_modules/@sentry/browser/esm/helpers.js',
  18. abs_path: 'webpack:///./node_modules/@sentry/browser/esm/helpers.js',
  19. lineno: 95,
  20. colno: 17,
  21. pre_context: [
  22. ' }); // Attempt to invoke user-land function',
  23. ' // NOTE: If you are a Sentry user, and you are seeing this stack frame, it',
  24. ' // means the sentry.javascript SDK caught an error invoking your application code. This',
  25. ' // is expected behavior and NOT indicative of a bug with sentry.javascript.',
  26. '',
  27. ],
  28. context_line: ' return fn.apply(this, wrappedArguments);',
  29. post_context: [
  30. ' } catch (ex) {',
  31. ' ignoreNextOnError();',
  32. ' withScope(function (scope) {',
  33. ' scope.addEventProcessor(function (event) {',
  34. ' if (options.mechanism) {',
  35. ],
  36. in_app: false,
  37. data: {
  38. sourcemap:
  39. 'https://develop.sentry.dev/app-69b3880622358a8ea89e.js.map',
  40. },
  41. },
  42. ],
  43. },
  44. rawStacktrace: {
  45. frames: [
  46. {
  47. function: 'HTMLDocument.o',
  48. filename: '/app-69b3880622358a8ea89e.js',
  49. abs_path: 'https://develop.sentry.dev/app-69b3880622358a8ea89e.js',
  50. lineno: 5,
  51. colno: 133993,
  52. pre_context: [
  53. '/*! For license information please see app-69b3880622358a8ea89e.js.LICENSE.txt */',
  54. '(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+924":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(fu {snip}',
  55. ' color: var(--light-text);',
  56. ' line-height: 1.65;',
  57. ],
  58. context_line:
  59. '{snip} ments);var o=n.map((function(e){return ze(e,t)}));return e.apply(this,o)}catch(i){throw Be(),$((function(e){e.addEventProcessor((function(e) {snip}',
  60. post_context: [
  61. '//# sourceMappingURL=app-69b3880622358a8ea89e.js.map',
  62. ],
  63. in_app: false,
  64. },
  65. ],
  66. },
  67. },
  68. ],
  69. },
  70. },
  71. ],
  72. ...params,
  73. };
  74. }