Skip to content

Commit

Permalink
Merge pull request #63 from RoushTech/release/0.6.4
Browse files Browse the repository at this point in the history
Release/0.6.4
  • Loading branch information
StrangeWill authored Oct 23, 2017
2 parents 1622195 + 69c73e5 commit 9bf3de4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# 0.6.3
# 0.6.4
<sup>Released: 2017/10/22</sup>

- Fix a null reference exception when no declaring type on thrown exception.

# 0.6.3
<sup>Released: 2017/09/04</sup>

- Use per-request dependencies for handling RollbarClient to prevent errors.
Expand Down
9 changes: 7 additions & 2 deletions src/RollbarDotNet/Builder/ExceptionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ protected List<Frame> BuildFrames(Exception exception)
{
var frames = new List<Frame>();
var stacktrace = new StackTrace(exception, true);
foreach (var stackTraceFrame in stacktrace.GetFrames())
var stackTraceFrames = stacktrace.GetFrames();
if (stackTraceFrames == null)
{
return frames;
}
foreach (var stackTraceFrame in stackTraceFrames)
{
var method = stackTraceFrame.GetMethod();
var methodParameters = method.GetParameters();
Expand All @@ -54,7 +59,7 @@ protected List<Frame> BuildFrames(Exception exception)
: method.GetParameters()
.Select(p => $"{p.ParameterType.FullName} {p.Name}")
.Aggregate((p1, p2) => $"{p1}, {p2}");
var methodName = $"{method.DeclaringType.FullName}.{method.Name}({parameters})";
var methodName = $"{method.DeclaringType?.FullName ?? "(unknown)"}.{method.Name}({parameters})";
var frame = new Frame
{
Filename = stackTraceFrame.GetFileName(),
Expand Down
2 changes: 1 addition & 1 deletion src/RollbarDotNet/RollbarDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>Rollbar Integration for .NET Core</Description>
<Copyright>William Roush 2016-2017</Copyright>
<AssemblyTitle>RollbarDotNet</AssemblyTitle>
<VersionPrefix>0.6.3</VersionPrefix>
<VersionPrefix>0.6.4</VersionPrefix>
<Authors>William Roush</Authors>
<AssemblyName>RollbarDotNet</AssemblyName>
<PackageId>RollbarDotNet</PackageId>
Expand Down

0 comments on commit 9bf3de4

Please sign in to comment.