How to use the @sentry/core.captureException function in @sentry/core

To help you get started, we’ve selected a few @sentry/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getsentry / sentry-javascript / packages / browser / src / helpers.ts View on Github external
const processedEvent = { ...event };

          if (options.mechanism) {
            addExceptionTypeValue(processedEvent, undefined, undefined);
            addExceptionMechanism(processedEvent, options.mechanism);
          }

          processedEvent.extra = {
            ...processedEvent.extra,
            arguments: normalize(args, 3),
          };

          return processedEvent;
        });

        captureException(ex);
      });
github getsentry / sentry-javascript / packages / node / src / handlers.ts View on Github external
withScope(scope => {
        if (_req.headers && isString(_req.headers['sentry-trace'])) {
          const span = Span.fromTraceparent(_req.headers['sentry-trace'] as string);
          scope.setSpan(span);
        }
        const eventId = captureException(error);
        (_res as any).sentry = eventId;
        next(error);
      });