1
1
2
+ using Segment . Concurrent ;
3
+
2
4
namespace Segment . Analytics
3
5
{
4
6
public class Configuration
@@ -21,6 +23,8 @@ public class Configuration
21
23
22
24
public bool userSynchronizeDispatcher { get ; }
23
25
26
+ public ICoroutineExceptionHandler exceptionHandler { get ; }
27
+
24
28
/// <summary>
25
29
/// Configuration that analytics can use
26
30
/// </summary>
@@ -38,7 +42,8 @@ public class Configuration
38
42
/// <param name="autoAddSegmentDestination">automatically add SegmentDestination plugin, defaults to <c>true</c></param>
39
43
/// <param name="userSynchronizeDispatcher">forcing everything to run synchronously, used for unit tests </param>
40
44
/// <param name="apiHost">set a default apiHost to which Segment sends events, defaults to <c>api.segment.io/v1</c></param>
41
- /// <param name="cdnHost">et a default cdnHost to which Segment fetches settings, defaults to <c>cdn-settings.segment.com/v1</c></param>
45
+ /// <param name="cdnHost">set a default cdnHost to which Segment fetches settings, defaults to <c>cdn-settings.segment.com/v1</c></param>
46
+ /// <param name="exceptionHandler">set a an exception handler to handle errors happened in async methods within the analytics scope</param>
42
47
public Configuration ( string writeKey ,
43
48
string persistentDataPath ,
44
49
int flushAt = 20 ,
@@ -47,7 +52,8 @@ public Configuration(string writeKey,
47
52
bool autoAddSegmentDestination = true ,
48
53
bool userSynchronizeDispatcher = false ,
49
54
string apiHost = null ,
50
- string cdnHost = null )
55
+ string cdnHost = null ,
56
+ ICoroutineExceptionHandler exceptionHandler = null )
51
57
{
52
58
this . writeKey = writeKey ;
53
59
this . persistentDataPath = persistentDataPath ;
@@ -58,6 +64,7 @@ public Configuration(string writeKey,
58
64
this . userSynchronizeDispatcher = userSynchronizeDispatcher ;
59
65
this . apiHost = apiHost ;
60
66
this . cdnHost = cdnHost ;
67
+ this . exceptionHandler = exceptionHandler ;
61
68
}
62
69
}
63
70
0 commit comments