added a note about AS-02 support.
[asdcplib.git] / src / KM_error.h
index c0305e88db1f839d1493ee38f0f59a3d42100de2..0d051746c888835f0a4a179920f9823f5458bb2d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2004-2011, John Hurst
+Copyright (c) 2004-2014, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -135,6 +135,22 @@ namespace Kumu
     return Kumu::RESULT_NULL_STR; \
   }
 
+// RESULT_STATE is ambiguous.  Use these everywhere it is assigned to provide some context
+#define KM_RESULT_STATE_TEST_IMPLICIT()                                        \
+  if ( result == Kumu::RESULT_STATE ) {                                        \
+    Kumu::DefaultLogSink().Error("RESULT_STATE RETURNED at %s (%d)\n", __FILE__, __LINE__); \
+  }
+
+#define KM_RESULT_STATE_TEST_THIS(_this__r_)                           \
+  if ( _this__r_ == Kumu::RESULT_STATE ) {                             \
+    Kumu::DefaultLogSink().Error("RESULT_STATE RETURNED at %s (%d)\n", __FILE__, __LINE__); \
+  }
+
+#define KM_RESULT_STATE_HERE()                                         \
+  Kumu::DefaultLogSink().Error("RESULT_STATE RETURNED at %s (%d)\n", __FILE__, __LINE__);
+
+
+
 namespace Kumu
 {
   // simple tracing mechanism