[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16608] booking: log database connection problem
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16608] booking: log database connection problem |
Date: |
Fri, 21 Apr 2017 04:28:31 -0400 (EDT) |
Revision: 16608
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16608
Author: sigurdne
Date: 2017-04-21 04:28:31 -0400 (Fri, 21 Apr 2017)
Log Message:
-----------
booking: log database connection problem
Modified Paths:
--------------
trunk/bookingfrontend/inc/custom/default/MinId.php
trunk/phpgwapi/inc/class.db.inc.php
trunk/phpgwapi/inc/class.db_adodb.inc.php
trunk/phpgwapi/inc/class.db_pdo.inc.php
Modified: trunk/bookingfrontend/inc/custom/default/MinId.php
===================================================================
--- trunk/bookingfrontend/inc/custom/default/MinId.php 2017-04-21 08:27:47 UTC
(rev 16607)
+++ trunk/bookingfrontend/inc/custom/default/MinId.php 2017-04-21 08:28:31 UTC
(rev 16608)
@@ -117,7 +117,12 @@
}
catch (Exception $e)
{
- $status = lang('unable_to_connect_to_database');
+ $GLOBALS['phpgw']->log->error(array(
+ 'text' =>
'bookingfrontend_external_user::get_breg_orgs() : error when trying to connect.
Error: %1',
+ 'p1' => $db->get_error_message(),
+ 'line' => __LINE__,
+ 'file' => __FILE__
+ ));
}
$sql = "SELECT DISTINCT orgnr FROM breg.personcurrent
WHERE fodselsnr ='{$fodselsnr}'";
Modified: trunk/phpgwapi/inc/class.db.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db.inc.php 2017-04-21 08:27:47 UTC (rev 16607)
+++ trunk/phpgwapi/inc/class.db.inc.php 2017-04-21 08:28:31 UTC (rev 16608)
@@ -100,6 +100,8 @@
var $persistent = false;
var $delayPointer = false;
+
+ var $error_message = '';
/**
* Constructor
* @param string $query query to be executed (optional)
@@ -171,6 +173,10 @@
}
+ public function get_error_message( )
+ {
+ return $this->error_message;
+ }
/**
* Backward compatibility for get current connection id
* @return bool true
Modified: trunk/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_adodb.inc.php 2017-04-21 08:27:47 UTC (rev
16607)
+++ trunk/phpgwapi/inc/class.db_adodb.inc.php 2017-04-21 08:28:31 UTC (rev
16608)
@@ -216,7 +216,7 @@
{
$message = 'could not connect to
server';
}
-
+ $this->error_message = $e->getMessage();
throw new Exception($message);
return false;
}
Modified: trunk/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_pdo.inc.php 2017-04-21 08:27:47 UTC (rev
16607)
+++ trunk/phpgwapi/inc/class.db_pdo.inc.php 2017-04-21 08:28:31 UTC (rev
16608)
@@ -245,7 +245,7 @@
{
$message = 'could not connect to
server';
}
-
+ $this->error_message = $e->getMessage();
throw new Exception($message);
return false;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16608] booking: log database connection problem,
sigurdne <=