Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Backtrace Unity Release Notes

## Version 3.2.2
- Fixed native iOS attributes

## Version 3.2.1
- Android stack trace parser improvements,
- Fixed Android NDK initialization when database directory doesn't exist,
Expand Down
7 changes: 5 additions & 2 deletions Runtime/BacktraceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ private void Awake()

private void OnDestroy()
{
Debug.Log("Disabling Backtrace integration");
Enabled = false;
Application.logMessageReceived -= HandleUnityMessage;
}
Expand Down Expand Up @@ -508,7 +507,7 @@ record = Database.Add(data);
if (record != null)
{
record.Dispose();
if (result.Status == BacktraceResultStatus.Ok && Database != null)
if (Database != null && result.Status != BacktraceResultStatus.ServerError)
{
Database.Delete(record);
}
Expand Down Expand Up @@ -620,6 +619,10 @@ private void SendUnhandledException(BacktraceUnhandledException exception)

private bool ShouldSendReport(Exception exception, List<string> attachmentPaths, Dictionary<string, string> attributes)
{
if(!Enabled)
{
return false;
}
// guess report type
var filterType = ReportFilterType.Exception;
if (exception is BacktraceUnhandledException)
Expand Down
2 changes: 1 addition & 1 deletion Runtime/BacktraceDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private void SendData(BacktraceDatabaseRecord record)
StartCoroutine(
BacktraceApi.Send(backtraceData, record.Attachments, queryAttributes, (BacktraceResult sendResult) =>
{
if (sendResult.Status == BacktraceResultStatus.Ok)
if (sendResult.Status != BacktraceResultStatus.ServerError)
{
Delete(record);
}
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Model/BacktraceData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class BacktraceData
/// <summary>
/// Version of the C# library
/// </summary>
public const string AgentVersion = "3.2.1";
public const string AgentVersion = "3.2.2";

/// <summary>
/// Application thread details
Expand Down
14 changes: 13 additions & 1 deletion Runtime/Services/BacktraceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,19 @@ public IEnumerator Send(string json, List<string> attachments, Dictionary<string
yield return request.SendWebRequest();

BacktraceResult result;
if (request.responseCode == 200 && (!request.isNetworkError || !request.isHttpError))
if(request.responseCode == 429)
{
result = new BacktraceResult()
{
Message = "Server report limit reached",
Status = Types.BacktraceResultStatus.LimitReached
};
if (OnServerResponse != null)
{
OnServerResponse.Invoke(result);
}
}
else if (request.responseCode == 200 && (!request.isNetworkError || !request.isHttpError))
{
result = BacktraceResult.FromJson(request.downloadHandler.text);

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Types/BacktraceResultStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public enum BacktraceResultStatus
{
/// <summary>
/// Set when client limit is reached
/// Set when client/server limit is reached
/// </summary>
LimitReached,
/// <summary>
Expand Down
Binary file modified iOS/libBacktrace-Unity-Cocoa.a
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "io.backtrace.unity",
"displayName": "Backtrace",
"version": "3.2.1",
"version": "3.2.2",
"unity": "2017.1",
"description": "Backtrace's integration with Unity games allows customers to capture and report handled and unhandled Unity exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.",
"keywords": [
Expand Down