Skip to content

Commit c97ed0a

Browse files
authored
Use obsolete attribute to display warning (#213)
1 parent ccb82ca commit c97ed0a

File tree

5 files changed

+9
-37
lines changed

5 files changed

+9
-37
lines changed

Runtime/Attributes.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Runtime/Attributes/NotSupportedAttribute.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Runtime/Attributes/NotSupportedAttribute.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/Model/BacktraceConfiguration.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Backtrace.Unity.Attributes;
2-
using Backtrace.Unity.Common;
1+
using Backtrace.Unity.Common;
32
using Backtrace.Unity.Model.Breadcrumbs;
43
using Backtrace.Unity.Services;
54
using Backtrace.Unity.Types;
@@ -140,7 +139,7 @@ public class BacktraceConfiguration : ScriptableObject
140139
/// <summary>
141140
/// Capture native crashes.
142141
/// </summary>
143-
[NotSupported]
142+
[Obsolete("Not supported")]
144143
#endif
145144
public bool CaptureNativeCrashes = true;
146145

@@ -150,7 +149,7 @@ public class BacktraceConfiguration : ScriptableObject
150149
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN
151150
[Tooltip("Capture ANR events - Application not responding")]
152151
#else
153-
[NotSupported]
152+
[Obsolete("Not supported")]
154153
#endif
155154
public bool HandleANR = true;
156155

@@ -161,7 +160,7 @@ public class BacktraceConfiguration : ScriptableObject
161160
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN
162161
[Tooltip("ANR watchdog timeout")]
163162
#else
164-
[NotSupported]
163+
[Obsolete("Not supported")]
165164
#endif
166165
public int AnrWatchdogTimeout = DefaultAnrWatchdogTimeout;
167166

@@ -171,7 +170,7 @@ public class BacktraceConfiguration : ScriptableObject
171170
#if UNITY_ANDROID || UNITY_IOS
172171
[Tooltip("Send Out of Memory exceptions to Backtrace")]
173172
#else
174-
[NotSupported]
173+
[Obsolete("Not supported")]
175174
#endif
176175
public bool OomReports = false;
177176

@@ -181,7 +180,7 @@ public class BacktraceConfiguration : ScriptableObject
181180
#if UNITY_2019_2_OR_NEWER && (UNITY_ANDROID || UNITY_IOS)
182181
[Tooltip("Enable client-side unwinding.")]
183182
#else
184-
[NotSupported]
183+
[Obsolete("Not supported")]
185184
#endif
186185
public bool ClientSideUnwinding = false;
187186

@@ -192,7 +191,7 @@ public class BacktraceConfiguration : ScriptableObject
192191
#if UNITY_2019_2_OR_NEWER && UNITY_ANDROID
193192
[Tooltip("Symbols upload token required to upload symbols to Backtrace")]
194193
#else
195-
[NotSupported]
194+
[Obsolete("Not supported")]
196195
#endif
197196
public string SymbolsUploadToken = string.Empty;
198197

Tests/Runtime/BacktraceClientTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ public void Setup()
1919
}
2020

2121
[UnityTest]
22+
[Obsolete]
2223
public IEnumerator TestClientConfigurationOptions_ValidConfigurationWithAllOptions_AllowsToUseNotSupportedOptions()
2324
{
2425
var clientConfiguration = GetValidClientConfiguration();
25-
clientConfiguration.OomReports = false;
2626
clientConfiguration.HandleANR = false;
2727
clientConfiguration.AnrWatchdogTimeout = 0;
2828
clientConfiguration.CaptureNativeCrashes = false;
29+
clientConfiguration.OomReports = false;
2930
clientConfiguration.ClientSideUnwinding = false;
3031
clientConfiguration.SymbolsUploadToken = string.Empty;
3132
BacktraceClient.Configuration = clientConfiguration;

0 commit comments

Comments
 (0)