Procházet zdrojové kódy

fixed PDOException code in API

Piotr Labudda před 7 roky
rodič
revize
de6cf5361e
3 změnil soubory, kde provedl 13 přidání a 0 odebrání
  1. 4 0
      SE/se-lib/Api/WfsData.php
  2. 5 0
      SE/se-lib/Api/WfsQgis.php
  3. 4 0
      SE/se-lib/Api/Wps.php

+ 4 - 0
SE/se-lib/Api/WfsData.php

@@ -65,6 +65,10 @@ class Api_WfsData extends ApiRouteBase {// TODO: extends Api_WfsBase which exten
 		} catch (Api_WfsException $e) {
 			DBG::logAuth($e);
 			$e->sendResponseXml();
+		} catch (PDOException $e) {
+			DBG::logAuth($e);
+			$wfsException = new Api_WfsException($e->getMessage(), 0, $e);
+			$wfsException->sendResponseXml();
 		} catch (Exception $e) {
 			DBG::logAuth($e);
 			$wfsException = new Api_WfsException($e->getMessage(), $e->getCode(), $e);

+ 5 - 0
SE/se-lib/Api/WfsQgis.php

@@ -41,6 +41,11 @@ class Api_WfsQgis extends ApiRouteBase {// TODO: extends Api_WfsBase which exten
 				DBG::log($e);
 				DBG::logAuth($e);
 				$e->sendResponseXml();
+			} catch (PDOException $e) {
+				DBG::log($e);
+				DBG::logAuth($e);
+				$wfsException = new Api_WfsException($e->getMessage(), 0, $e);
+				$wfsException->sendResponseXml();
 			} catch (Exception $e) {
 				DBG::log($e);
 				DBG::logAuth($e);

+ 4 - 0
SE/se-lib/Api/Wps.php

@@ -75,6 +75,10 @@ class Api_Wps extends ApiRouteBase {// TODO: extends Api_WfsBase which extends A
 		} catch (Api_WfsException $e) {
 			DBG::logAuth($e);
 			$e->sendResponseXml();
+		} catch (PDOException $e) {
+			DBG::logAuth($e);
+			$wfsException = new Api_WfsException($e->getMessage(), 0, $e);
+			$wfsException->sendResponseXml();
 		} catch (Exception $e) {
 			DBG::logAuth($e);
 			$wfsException = new Api_WfsException($e->getMessage(), $e->getCode(), $e);