From cf35b92104d8a4535eef619cfcc44664815bc534 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 2 Apr 2019 10:08:23 +0200 Subject: [PATCH] Give more details for exception throw --- .../android/model/utils/SessionSetManager.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/pokeranalytics/android/model/utils/SessionSetManager.kt b/app/src/main/java/net/pokeranalytics/android/model/utils/SessionSetManager.kt index 66b4b000..1d28ac2e 100644 --- a/app/src/main/java/net/pokeranalytics/android/model/utils/SessionSetManager.kt +++ b/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") } - if (session.startDate == null || session.endDate == null) { - throw IllegalStateException("Start or end date should never be null here") + if (session.startDate == null) { + 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 startDate = session.startDate!!