Skip to content
Merged
Changes from 1 commit
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
11 changes: 7 additions & 4 deletions android/src/main/kotlin/com/airship/flutter/AirshipPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class AirshipPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {

proxy.featureFlagManager.flag(flagName, useResultCache)
} catch (e: Exception) {
result.error("ERROR", "Failed to get flag", e.localizedMessage)
Log.e("AirshipPlugin", "Error processing featureFlagManager#flag", e)
}
}

Expand All @@ -362,7 +362,8 @@ class AirshipPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
try {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not have a try here, its already handled by the resolve method extension

proxy.featureFlagManager.resultCache.flag(call.stringArg())
} catch (e: Exception) {
result.error("ERROR", "Failed to get flag", e.localizedMessage)
Log.e("AirshipPlugin",
"Error processing featureFlagManager#resultCacheGetFlag", e)
}
}
}
Expand All @@ -377,7 +378,8 @@ class AirshipPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
try {
proxy.featureFlagManager.resultCache.cache(flag, miliseconds)
} catch (e: Exception) {
result.error("ERROR", "Failed to set flag", e.localizedMessage)
Log.e("AirshipPlugin",
"Error processing featureFlagManager#resultCacheSetFlag", e)
}
}
}
Expand All @@ -387,7 +389,8 @@ class AirshipPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
try {
proxy.featureFlagManager.resultCache.removeCachedFlag(call.stringArg())
} catch (e: Exception) {
result.error("ERROR", "Failed to remove cached flag", e.localizedMessage)
Log.e("AirshipPlugin",
"Error processing featureFlagManager#resultCacheRemoveFlag", e)
}
}
}
Expand Down