@@ -45,31 +45,31 @@ internal class Store (private val sharedPrefs: SharedPreferences, user: StatsigU
45
45
currentUserCacheKey = user.getCacheKey()
46
46
47
47
if (cachedResponse != null ) {
48
- try {
48
+ Statsig .errorBoundary.capture( {
49
49
val type = object : TypeToken <MutableMap <String , Cache >>() {}.type
50
50
cacheById = gson.fromJson(cachedResponse, type) ? : cacheById
51
- } catch (_ : Exception ) {
51
+ }, {
52
52
StatsigUtil .removeFromSharedPrefs(sharedPrefs, CACHE_BY_USER_KEY )
53
- }
53
+ })
54
54
}
55
55
56
56
stickyDeviceExperiments = mutableMapOf ()
57
57
if (cachedDeviceValues != null ) {
58
- try {
58
+ Statsig .errorBoundary.capture( {
59
59
val type = object : TypeToken <MutableMap <String , APIDynamicConfig >>() {}.type
60
60
stickyDeviceExperiments = gson.fromJson(cachedDeviceValues, type) ? : stickyDeviceExperiments
61
- } catch (_ : Exception ) {
61
+ }, {
62
62
StatsigUtil .removeFromSharedPrefs(sharedPrefs, STICKY_DEVICE_EXPERIMENTS_KEY )
63
- }
63
+ })
64
64
}
65
65
66
66
localOverrides = StatsigOverrides (mutableMapOf (), mutableMapOf ())
67
67
if (cachedLocalOverrides != null ) {
68
- try {
68
+ Statsig .errorBoundary.capture( {
69
69
localOverrides = gson.fromJson(cachedLocalOverrides, StatsigOverrides ::class .java)
70
- } catch (_ : Exception ) {
70
+ }, {
71
71
StatsigUtil .removeFromSharedPrefs(sharedPrefs, LOCAL_OVERRIDES_KEY )
72
- }
72
+ })
73
73
}
74
74
reason = EvaluationReason .Uninitialized
75
75
currentCache = loadCacheForCurrentUser()
0 commit comments