aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-08-12 13:17:32 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-08-12 13:17:32 +0200
commitaf4c9d65fe811aec2933e8acd7a822dfde1e3940 (patch)
treeb8e13c01d4efbca1c1bb5d70433a986ddd487bed /src
parent969e385795456d8c82e39f103b2cdaf34327a493 (diff)
downloadauerswald-callnotifier-af4c9d65fe811aec2933e8acd7a822dfde1e3940.tar.gz
auerswald-callnotifier-af4c9d65fe811aec2933e8acd7a822dfde1e3940.zip
catch sql errors
Diffstat (limited to 'src')
-rw-r--r--src/callnotifier/CallMonitor/Detailler/OpenGeoDb.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/callnotifier/CallMonitor/Detailler/OpenGeoDb.php b/src/callnotifier/CallMonitor/Detailler/OpenGeoDb.php
index 2b48004..8345128 100644
--- a/src/callnotifier/CallMonitor/Detailler/OpenGeoDb.php
+++ b/src/callnotifier/CallMonitor/Detailler/OpenGeoDb.php
@@ -85,6 +85,12 @@ class CallMonitor_Detailler_OpenGeoDb implements CallMonitor_Detailler
. ' OR vorwahl = ' . $this->db->quote(substr($number, 0, 6))
. ' ORDER BY einwohner DESC'
);
+ if ($stm === false) {
+ throw new \Exception(
+ implode(' - ', $this->db->errorInfo())
+ );
+ }
+
$res = $stm->fetch();
if ($res === false) {
return null;