Author: sayer
Date: 2009-05-06 18:46:38 +0200 (Wed, 06 May 2009)
New Revision: 1366

Modified:
   trunk/apps/dsm/DSMChartReader.cpp
   trunk/apps/dsm/DSMCoreModule.cpp
Log:
clearer error message

Modified: trunk/apps/dsm/DSMChartReader.cpp
===================================================================
--- trunk/apps/dsm/DSMChartReader.cpp   2009-05-06 15:34:34 UTC (rev 1365)
+++ trunk/apps/dsm/DSMChartReader.cpp   2009-05-06 16:46:38 UTC (rev 1366)
@@ -121,7 +121,11 @@
     if (a) return a;
   }
 
-  return core_mod.getAction(str);
+  DSMAction* a = core_mod.getAction(str);
+  if (a) return a;
+
+  ERROR("could not find action for '%s' (missing import?)\n", str.c_str());
+  return NULL;
 }
 
 DSMCondition* DSMChartReader::conditionFromToken(const string& str, bool 
invert) {
@@ -138,7 +142,9 @@
   if (c) 
     c->invert = invert;
 
-  return c;
+  if (c)  return c;
+  ERROR("could not find condition for '%s' (missing import?)\n", str.c_str());
+  return NULL;
 }
 
 bool DSMChartReader::importModule(const string& mod_cmd, const string& 
mod_path) {

Modified: trunk/apps/dsm/DSMCoreModule.cpp
===================================================================
--- trunk/apps/dsm/DSMCoreModule.cpp    2009-05-06 15:34:34 UTC (rev 1365)
+++ trunk/apps/dsm/DSMCoreModule.cpp    2009-05-06 16:46:38 UTC (rev 1366)
@@ -93,7 +93,6 @@
   DEF_CMD("B2B.terminateOtherLeg", SCB2BTerminateOtherLegAction);
   DEF_CMD("B2B.sendReinvite", SCB2BReinviteAction);
 
-  ERROR("could not find action named '%s'\n", cmd.c_str());
   return NULL;
 }
 
@@ -143,7 +142,6 @@
   if (cmd == "B2B.otherBye") 
     return new TestDSMCondition(params, DSMCondition::B2BOtherBye);  
 
-  ERROR("could not find condition for '%s'\n", cmd.c_str());
   return NULL;
 }
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to