summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorUrban Müller2008-07-10 13:46:20 +0000
committerUrban Müller2008-07-10 13:46:20 +0000
commit1b6c55a9a0b0365a6af346eb7472ba077f3243ce (patch)
tree05f8c042bc4694a4a48a264bd7b987c887d49454 /it_dbi.class
parent1eb87694ab5e1bd77bd9d6c7ab72e188fd5843df (diff)
downloaditools-1b6c55a9a0b0365a6af346eb7472ba077f3243ce.tar.gz
itools-1b6c55a9a0b0365a6af346eb7472ba077f3243ce.tar.bz2
itools-1b6c55a9a0b0365a6af346eb7472ba077f3243ce.zip
better err msg
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class12
1 files changed, 6 insertions, 6 deletions
diff --git a/it_dbi.class b/it_dbi.class
index aa88487..914a162 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -330,15 +330,15 @@ function _where($params = "", $link = null, $omit_where = false)
*/
function _fatal($text)
{
- $text .= ", server=" . $this->_p['server'];
-
- if ($this->_link && ($res = @mysql_fetch_row(mysql_query('select database()', $this->_link)))) # dont create extra errs
- $text .= ", db=" . $res[0];
+ $text = get_class($this).'::'.$text;
if ($this->_link && ($errno = mysql_errno($this->_link)) && ($errstr = mysql_error($this->_link)))
- $text .= ", error=$errno ($errstr)";
+ $text = "\"$errstr\" in $text";
+
+ if ($this->_link && ($res = @mysql_fetch_row(mysql_query('select database()', $this->_link)))) # dont create extra errs
+ $text .= ", DB: " . $res[0];
- it::fatal(get_class($this).'::'.$text);
+ it::fatal($text . ", Server: " . $this->_p['server']);
/* NOT REACHED */
}