{% load i18n %}
{% blocktrans with 'https://github.com/getsentry/raven-csharp' as link %}Start by installing raven-csharp:{% endblocktrans %}
{% blocktrans %}Initialize the client:{% endblocktrans %}
ravenClient = new RavenClient("{% if dsn %}{{ dsn }}{% else %}SENTRY_DSN{% endif %}");
{% blocktrans %}To capture errors, you'll need to wrap your code in a simple try/catch block:{% endblocktrans %}
try
{
int i2 = 0;
int i = 10 / i2;
}
catch (Exception e)
{
ravenClient.CaptureException(e);
}
{% blocktrans with 'https://github.com/getsentry/raven-csharp' as link %}For more information on other uses of Raven with C#, please see the official documentation for raven-csharp.{% endblocktrans %}