/** * Creates an instance of Raven using the provided DSN. * * @param dsn Data Source Name of the Sentry server. * @return an instance of Raven. */ public static Raven ravenInstance(Dsn dsn) { return ravenInstance(dsn, null); }
RuntimeException lastExc = null; for (RavenFactory ravenFactory : getRegisteredFactories()) { String name = ravenFactory.getClass().getName(); if (ravenFactoryName != null && !ravenFactoryName.equals(name)) { triedFactories.add(name); try { Raven ravenInstance = ravenFactory.createRavenInstance(dsn); logger.debug("The RavenFactory '{}' created an instance of Raven.", ravenFactory); return ravenInstance;
public ReportController() { raven = RavenFactory.ravenInstance(POST_URL); }
/** * Creates an instance of Raven using the DSN obtain through {@link com.getsentry.raven.dsn.Dsn#dsnLookup()}. * * @return an instance of Raven. */ public static Raven ravenInstance() { return ravenInstance(Dsn.dsnLookup()); }
/** * Creates an instance of Raven using the provided DSN. * * @param dsn Data Source Name of the Sentry server. * @return an instance of Raven. */ public static Raven ravenInstance(String dsn) { return ravenInstance(new Dsn(dsn)); }
public Raven getRaven() { if (raven == null) { raven = RavenFactory.ravenInstance(Application.get().getRemoteConfigLoader().getString(CoreConfigParameter.SENTRY_DSN)); } return raven; }
/** * Initialises the Raven instance. */ protected synchronized void initRaven() { try { if (dsn == null) { dsn = Dsn.dsnLookup(); } raven = RavenFactory.ravenInstance(new Dsn(dsn), ravenFactory); } catch (InvalidDsnException e) { addError("An exception occurred during the retrieval of the DSN for Raven", e); } catch (Exception e) { addError("An exception occurred during the creation of a Raven instance", e); } }
/** * Initialises the Raven instance. */ protected synchronized void initRaven() { try { if (dsn == null) { dsn = Dsn.dsnLookup(); } raven = RavenFactory.ravenInstance(new Dsn(dsn), ravenFactory); } catch (InvalidDsnException e) { error("An exception occurred during the retrieval of the DSN for Raven", e); } catch (Exception e) { error("An exception occurred during the creation of a Raven instance", e); } }
/** * Initialises the Raven instance. */ protected synchronized void initRaven() { try { if (dsn == null) { dsn = Dsn.dsnLookup(); } raven = RavenFactory.ravenInstance(new Dsn(dsn), ravenFactory); } catch (InvalidDsnException e) { reportError("An exception occurred during the retrieval of the DSN for Raven", e, ErrorManager.OPEN_FAILURE); } catch (Exception e) { reportError("An exception occurred during the creation of a Raven instance", e, ErrorManager.OPEN_FAILURE); } }