dotnet.json 2.1 KB

123456
  1. {
  2. "html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>A <a class=\"reference external\" href=\"https://www.nuget.org/packages/SharpRaven\">NuGet Package</a> is\navailable for SharpRaven if you don&#8217;t want to compile it yourself.</p>\n<p>Instantiate the client with your DSN:</p>\n<div class=\"highlight-csharp\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span><span style=\"color: #2eb0f7\">var</span> <span style=\"color: #111111\">ravenClient</span> <span style=\"color: #111111\">=</span> <span style=\"color: #2eb0f7\">new</span> <span style=\"color: #111111\">RavenClient(</span><span style=\"color: #e8535a\">&quot;___DSN___&quot;</span><span style=\"color: #111111\">);</span>\n</pre></div>\n</div>\n</div>\n\n\n<div class=\"section\" id=\"capturing-exceptions\">\n<h2>Capturing Exceptions</h2>\n<p>Call out to the client in your catch block:</p>\n<div class=\"highlight-csharp\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span><span style=\"color: #2eb0f7\">try</span>\n<span style=\"color: #111111\">{</span>\n <span style=\"color: #2eb0f7\">int</span> <span style=\"color: #111111\">i2</span> <span style=\"color: #111111\">=</span> <span style=\"color: #45c2c9\">0</span><span style=\"color: #111111\">;</span>\n <span style=\"color: #2eb0f7\">int</span> <span style=\"color: #111111\">i</span> <span style=\"color: #111111\">=</span> <span style=\"color: #45c2c9\">10</span> <span style=\"color: #111111\">/</span> <span style=\"color: #111111\">i2;</span>\n<span style=\"color: #111111\">}</span>\n<span style=\"color: #2eb0f7\">catch</span> <span style=\"color: #111111\">(Exception</span> <span style=\"color: #111111\">exception)</span>\n<span style=\"color: #111111\">{</span>\n <span style=\"color: #111111\">ravenClient.Capture(</span><span style=\"color: #2eb0f7\">new</span> <span style=\"color: #111111\">SentryEvent(exception));</span>\n<span style=\"color: #111111\">}</span>\n</pre></div>\n</div>\n</div>\n",
  3. "link": "https://docs.getsentry.com/platforms/dotnet/",
  4. "id": "dotnet",
  5. "name": ".NET"
  6. }