Give more details for exception throw

feature/top10
Laurent 7 years ago
parent 8c3a689760
commit cf35b92104
  1. 7
      app/src/main/java/net/pokeranalytics/android/model/utils/SessionSetManager.kt

@ -23,8 +23,11 @@ class SessionSetManager {
throw IllegalStateException("realm should be in transaction at this point") throw IllegalStateException("realm should be in transaction at this point")
} }
if (session.startDate == null || session.endDate == null) { if (session.startDate == null) {
throw IllegalStateException("Start or end date should never be null here") throw IllegalStateException("Start date should never be null here")
}
if (session.endDate == null) {
throw IllegalStateException("End date should never be null here")
} }
val endDate = session.endDate!! // tested above val endDate = session.endDate!! // tested above
val startDate = session.startDate!! val startDate = session.startDate!!

Loading…
Cancel
Save