Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
Addressing PR comments
  • Loading branch information
mduncan26 committed Jul 28, 2020
1 parent 3bb59e2 commit 1661987
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Mindscape.Raygun4Net.WinRT/RaygunClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private bool ValidateApiKey()
private bool _handlingRecursiveErrorSending;

// Returns true if the message can be sent, false if the sending is canceled.
protected bool OnSendingMessage(RaygunMessage raygunMessage, Exception exception)
protected bool OnSendingMessage(RaygunMessage raygunMessage, Exception exception = null)
{
bool result = true;

Expand Down
8 changes: 5 additions & 3 deletions Mindscape.Raygun4Net.WindowsStore/RaygunClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private bool ValidateApiKey()
private bool _handlingRecursiveErrorSending;

// Returns true if the message can be sent, false if the sending is canceled.
protected bool OnSendingMessage(RaygunMessage raygunMessage, Exception exception)
protected bool OnSendingMessage(RaygunMessage raygunMessage, Exception exception = null)
{
bool result = true;

Expand Down Expand Up @@ -279,7 +279,8 @@ public async Task SendAsync(Exception exception, IList<string> tags, IDictionary
/// </summary>
/// <param name="raygunMessage">The RaygunMessage to send. This needs its OccurredOn property
/// set to a valid DateTime and as much of the Details property as is available.</param>
public async Task SendAsync(RaygunMessage raygunMessage, Exception exception)
/// <param name="exception">The original exception object that the <paramref name="raygunMessage"/> is based upon.</param>
public async Task SendAsync(RaygunMessage raygunMessage, Exception exception = null)
{
await SendOrSave(raygunMessage, exception);
}
Expand Down Expand Up @@ -329,7 +330,8 @@ public void Send(Exception exception, IList<string> tags, IDictionary userCustom
/// </summary>
/// <param name="raygunMessage">The RaygunMessage to send. This needs its OccurredOn property
/// set to a valid DateTime and as much of the Details property as is available.</param>
public void Send(RaygunMessage raygunMessage, Exception exception)
/// <param name="exception">The original exception object that the <paramref name="raygunMessage"/> is based upon.</param>
public void Send(RaygunMessage raygunMessage, Exception exception = null)
{
SendOrSave(raygunMessage, exception).Wait(3000);
}
Expand Down
4 changes: 2 additions & 2 deletions Mindscape.Raygun4Net/RaygunClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ public void SendInBackground(Exception exception, IList<string> tags, IDictionar
/// </summary>
/// <param name="raygunMessage">The RaygunMessage to send. This needs its OccurredOn property
/// set to a valid DateTime and as much of the Details property as is available.</param>
/// <param name="exception">The original exception that generated the RaygunMessage</param>
public void SendInBackground(RaygunMessage raygunMessage, Exception exception)
/// <param name="exception">The original exception object that the <paramref name="raygunMessage"/> is based upon.</param>
public void SendInBackground(RaygunMessage raygunMessage, Exception exception = null)
{
ThreadPool.QueueUserWorkItem(c => Send(raygunMessage, exception));
}
Expand Down
5 changes: 5 additions & 0 deletions Mindscape.Raygun4Net/RaygunSendingMessageEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ public class RaygunSendingMessageEventArgs : CancelEventArgs
{
private RaygunMessage _raygunMessage;
private Exception _exception;

public RaygunSendingMessageEventArgs(RaygunMessage message)
: this(message, null)
{
}

public RaygunSendingMessageEventArgs(RaygunMessage message, Exception exception)
{
Expand Down

0 comments on commit 1661987

Please sign in to comment.