From 6ac606a5d4797bd5839542e6acb33d827604e434 Mon Sep 17 00:00:00 2001
From: josh <josh@elixxir.io>
Date: Mon, 1 Feb 2021 12:33:29 -0800
Subject: [PATCH] Add better error statements

---
 network/ephemeral/check.go | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/network/ephemeral/check.go b/network/ephemeral/check.go
index 589107f70..1bfe34dec 100644
--- a/network/ephemeral/check.go
+++ b/network/ephemeral/check.go
@@ -54,7 +54,8 @@ func check(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
 		now := time.Now()
 		protoIds, err := getUpcomingIDs(ourId, now, lastCheck)
 		if err != nil {
-			globals.Log.FATAL.Panicf("Could not generate : %v", err)
+			globals.Log.FATAL.Panicf("Could not generate " +
+				"upcoming IDs: %v", err)
 		}
 
 		// Generate identities off of that list
@@ -66,7 +67,8 @@ func check(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
 			if !identityStore.IsNewIdentity(identity) {
 				// If not not, insert identity into store
 				if err = identityStore.InsertIdentity(identity); err != nil {
-					return
+					globals.Log.FATAL.Panicf("Could not insert " +
+						"identity: %v", err)
 				}
 			}
 
@@ -75,12 +77,14 @@ func check(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
 		// Generate the time stamp for storage
 		vo, err := marshalTimestamp(now)
 		if err != nil {
-			return
+			globals.Log.FATAL.Panicf("Could not marshal " +
+				"timestamp for storage: %v", err)
+
 		}
 
 		// Store the timestamp
 		if err = session.Set(TimestampKey, vo); err != nil {
-			return
+			globals.Log.FATAL.Panicf("Could not store timestamp: %v", err)
 		}
 
 		// Sleep until the last Id has expired
-- 
GitLab