{% load i18n %}

{% blocktrans with 'https://github.com/kencochrane/raven-java' as link %}Start by installing raven-java.{% endblocktrans %}

{% trans "Create an instance of the client:" %}

RavenClient client = new RavenClient("{% if dsn %}{{ dsn }}{% else %}SENTRY_DSN{% endif %}");

{% trans "Now call out to the raven client to capture events:" %}

// {% trans "record a simple message" %}
client.captureMessage('hello world!')

// {% trans "capture an exception" %}
try {
    throw new RuntimeException("Uh oh!");
}
catch (Throwable e) {
    client.captureException(e);
}

{% blocktrans with 'https://github.com/kencochrane/raven-java' as link %}For more information on other uses of Raven with Java, please see the official documentation for raven-java.{% endblocktrans %}