File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,8 @@ internal open class UserManager(
166166 Logging .log(LogLevel .DEBUG , " setTag(key: $key , value: $value )" )
167167
168168 if (key.isEmpty()) {
169- throw Exception (" Cannot add tag with empty key" )
169+ Logging .log(LogLevel .ERROR , " Cannot add tag with empty key" )
170+ return
170171 }
171172
172173 _propertiesModel .tags[key] = value
@@ -177,7 +178,8 @@ internal open class UserManager(
177178
178179 tags.forEach {
179180 if (it.key.isEmpty()) {
180- throw Exception (" Cannot add tag with empty key" )
181+ Logging .log(LogLevel .ERROR , " Cannot add tag with empty key" )
182+ return
181183 }
182184 }
183185
@@ -190,7 +192,8 @@ internal open class UserManager(
190192 Logging .log(LogLevel .DEBUG , " removeTag(key: $key )" )
191193
192194 if (key.isEmpty()) {
193- throw Exception (" Cannot remove tag with empty key" )
195+ Logging .log(LogLevel .ERROR , " Cannot remove tag with empty key" )
196+ return
194197 }
195198
196199 _propertiesModel .tags.remove(key)
@@ -201,7 +204,8 @@ internal open class UserManager(
201204
202205 keys.forEach {
203206 if (it.isEmpty()) {
204- throw Exception (" Cannot remove tag with empty key" )
207+ Logging .log(LogLevel .ERROR , " Cannot remove tag with empty key" )
208+ return
205209 }
206210 }
207211
You can’t perform that action at this time.
0 commit comments