Bläddra i källkod

Internal: buggy Exception handlers for some query APIs in CMDBSource

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3734 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 år sedan
förälder
incheckning
c1e6ec5aae
1 ändrade filer med 6 tillägg och 6 borttagningar
  1. 6 6
      core/cmdbsource.class.inc.php

+ 6 - 6
core/cmdbsource.class.inc.php

@@ -1,5 +1,5 @@
 <?php
-// Copyright (C) 2010-2014 Combodo SARL
+// Copyright (C) 2010-2015 Combodo SARL
 //
 //   This file is part of iTop.
 //
@@ -20,7 +20,7 @@
 /**
  * DB Server abstraction
  *
- * @copyright   Copyright (C) 2010-2012 Combodo SARL
+ * @copyright   Copyright (C) 2010-2015 Combodo SARL
  * @license     http://opensource.org/licenses/AGPL-3.0
  */
 
@@ -336,7 +336,7 @@ class CMDBSource
 		catch(mysqli_sql_exception $e)
 		{
 			$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
-			MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
+			throw new MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
 		}
 		$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
 		if ($oResult === false)
@@ -368,7 +368,7 @@ class CMDBSource
 		catch(mysqli_sql_exception $e)
 		{
 			$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
-			MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
+			throw new MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
 		}
 		$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
 		if ($oResult === false)
@@ -404,7 +404,7 @@ class CMDBSource
 		}
 		catch(mysqli_sql_exception $e)
 		{
-			MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
+			throw new MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
 		}
 		if ($oResult === false)
 		{
@@ -430,7 +430,7 @@ class CMDBSource
 		}
 		catch(mysqli_sql_exception $e)
 		{
-			MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
+			throw new MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
 		}
 		if ($oResult === false)
 		{