Skip to content

Commit

Permalink
style: move ParselyNotInitializedException message to exception itself
Browse files Browse the repository at this point in the history
To align with other exception and move responsibility from `ParselyTracker`
  • Loading branch information
wzieba committed Jan 23, 2024
1 parent b23113a commit cf9843d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package com.parsely.parselyandroid

public class ParselyNotInitializedException(override val message: String?) : Exception()
public class ParselyNotInitializedException() :
Exception("Parse.ly client has not been initialized. Call ParselyTracker#init before using the SDK.")
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public object ParselyTracker {

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

Expand Down

0 comments on commit cf9843d

Please sign in to comment.