Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Feb 20, 2015
2 parents 00326f4 + d7253a5 commit b61b042
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/app/SharpRaven/Data/JsonPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

using System;
using System.Collections.Generic;
using System.Reflection;

using Newtonsoft.Json;

Expand Down Expand Up @@ -82,6 +83,18 @@ public JsonPacket(string project, Exception exception)

Exceptions.Add(sentryException);
}

// ReflectionTypeLoadException doesn't contain much useful info in itself, and needs special handling
ReflectionTypeLoadException reflectionTypeLoadException = exception as ReflectionTypeLoadException;
if (reflectionTypeLoadException != null)
{
foreach (Exception loaderException in reflectionTypeLoadException.LoaderExceptions)
{
SentryException sentryException = new SentryException(loaderException);

Exceptions.Add(sentryException);
}
}
}


Expand Down
13 changes: 11 additions & 2 deletions src/app/SharpRaven/Data/SentryRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,17 @@ private static bool HasHttpContext
/// </returns>
public static SentryRequest GetRequest()
{
var request = new SentryRequest();
return HasHttpContext ? request : null;
try
{
var request = new SentryRequest();
return HasHttpContext ? request : null;
}
catch (Exception exception)
{
Console.WriteLine(exception);
}

return null;
}


Expand Down

0 comments on commit b61b042

Please sign in to comment.