How to use the raven.isSetup function in raven

To help you get started, we’ve selected a few raven 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 ember-cli-sentry / ember-cli-sentry / addon / index.js View on Github external
export function initialize(container, config) {
  if (Raven.isSetup() === true) {
    return;
  }

  if (get(config, 'sentry.development') === true) {
    if (get(config, 'sentry.debug') === true) {
      console.info('`sentry` is configured for development mode.');
    }
    return;
  }

  if (!config.sentry) {
    throw new Error('`sentry` should be configured when not in development mode.');
  }

  container.lookup('service:raven').setup(config);
}
github ember-cli-sentry / ember-cli-sentry / addon / services / raven.js View on Github external
get isRavenUsable() {
    return typeof(FastBoot) === 'undefined' && Raven.isSetup() === true;
  },