Unity-Technologies / com.unity.mobile.notifications

Mobile Notifications Package
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.1/manual/index.html
Other
131 stars 42 forks source link

Handle outofmemory errors in serialization #179

Closed aurimasc closed 2 years ago

aurimasc commented 2 years ago

https://github.com/Unity-Technologies/com.unity.mobile.notifications/issues/151

Sometimes serializing/deserializing notifications can throw OutOfMemoryError. In Java it's not descendant of Exception, needs to be handled separately (don't want to catch Throwable, since that would include other exception that mean worse things we don't want to handle). It is better to lose a notification than to lose them all or crash. Also, we have a whole set of fallbacks, so some of these catches will be recoverable.