changeset 1276:db759fb1d6e6 bugs/2020-02-invisible-slice

Added debug message if observer invalid
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 04 Feb 2020 12:31:22 +0100
parents 41d19fa749b7
children 5428b8594382
files Framework/Messages/IObserver.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Messages/IObserver.cpp	Tue Feb 04 12:31:03 2020 +0100
+++ b/Framework/Messages/IObserver.cpp	Tue Feb 04 12:31:22 2020 +0100
@@ -82,8 +82,13 @@
 
   bool IObserver::DoesFingerprintLookGood() const
   {
-    return (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) &&
+    bool ok = (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) &&
       (fingerprint_[1] == fingerprint_[0] / 2) &&
       (fingerprint_[2] == fingerprint_[1] + IObserver_UNIQUE_ID_MAGIC_NUMBER);
+    if(!ok) 
+    {
+      LOG(INFO) << "Fingerprint not valid: " << " fingerprint_[0] = " << fingerprint_[0] << " fingerprint_[1] = " << fingerprint_[1]<< " fingerprint_[2] = " << fingerprint_[2];
+    }
+    return ok;
   }
 }