Skip to content

Commit

Permalink
fix: do not add @Throws annotation to ensureInitialized
Browse files Browse the repository at this point in the history
It's `private` method, not exposed to the client so there's no point in adding this annotation. Also, I don't add it to public methods because I don't want force clients to handle exception each time they want to call SDK.
  • Loading branch information
wzieba committed Jan 23, 2024
1 parent 1ddfda1 commit 451d061
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public object ParselyTracker {
private const val DEFAULT_FLUSH_INTERVAL_SECS = 60
private var instance: ParselyTrackerInternal? = null

@Throws(ParselyNotInitializedException::class)
private fun ensureInitialized(): ParselyTrackerInternal {
return instance ?: run {
throw ParselyNotInitializedException("Parse.ly client has not been initialized. Call ParselyTracker#init before using the SDK.");
Expand Down

0 comments on commit 451d061

Please sign in to comment.