Преглед изворни кода

Instrumented the code to help in solving the "restore runing" issue. Completion of commits [3733] znd [3595] = issue an exception if something is going wrong within iTopMutex::TryLock (exceptions are correctly handled in the various places where TryLock is invoked)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3736 a333f486-631f-4898-b8df-5754b55c2be0
romainq пре 9 година
родитељ
комит
bebfa57f54
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      core/mutex.class.inc.php

+ 3 - 1
core/mutex.class.inc.php

@@ -133,7 +133,9 @@ class iTopMutex
 		}
 		if (($res !== '1') && ($res !== '0'))
 		{
-			IssueLog::Error('GET_LOCK('.$this->sName.', 0) returned: '.var_export($res, true).'. Expected values are: 0, 1 or null !!');
+			$sMsg = 'GET_LOCK('.$this->sName.', 0) returned: '.var_export($res, true).'. Expected values are: 0, 1 or null';
+			IssueLog::Error($sMsg);
+			throw new Exception($sMsg);
 		}
 		return ($res !== '0');
 	}