diff options
-rw-r--r-- | it_dbi.class | 12 |
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 */ } |