try catch completed reply
authorKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 12 Jul 2013 21:31:12 +0000 (14:31 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 12 Jul 2013 21:31:12 +0000 (14:31 -0700)
lib/debugout.cpp
plugins/opencvlux/opencvluxplugin.cpp

index 36053dc..102de07 100644 (file)
@@ -23,8 +23,8 @@ using namespace std;
 int DebugOut::debugThreshhold = 0;
 std::streambuf * DebugOut::buf = cout.rdbuf();
 
-const int DebugOut::Error = 999999;
-const int DebugOut::Warning = 999998;
+const int DebugOut::Error = 1 << 16;
+const int DebugOut::Warning = 1 << 24;
 
 void debugOut(string message)
 {
index 025a8b5..9ab7434 100644 (file)
@@ -281,7 +281,13 @@ void OpenCvLuxPlugin::updateProperty(uint lux)
                AsyncPropertyReply* reply = *itr;
                reply->value = &l;
                reply->success = true;
-               reply->completed(reply);
+               try{
+                       reply->completed(reply);
+               }
+               catch(...)
+               {
+                       DebugOut(DebugOut::Warning)<<"reply failed"<<endl;
+               }
        }
 
        replyQueue.clear();