Changed error output the new OutputDebugMessage function in logstream classes

This commit is contained in:
Andre Lorbach 2009-03-24 16:07:36 +01:00
parent ff33514623
commit 2af9d4fb65
3 changed files with 5 additions and 7 deletions

View File

@ -1225,7 +1225,7 @@ class LogStreamDB extends LogStream {
$errormsg.="Referer: ".getenv("HTTP_REFERER"). "<br>";
//Output!
print( $errormsg );
OutputDebugMessage("LogStreamDB|CreateMainSQLQuery: $errormsg", DEBUG_ERROR);
}
}

View File

@ -1005,7 +1005,7 @@ class LogStreamPDO extends LogStream {
$this->_myDBQuery = $this->_dbhandle->query($szSql);
if ( !$this->_myDBQuery )
{
$this->PrintDebugError( "Invalid SQL: ".$szSql . "<br><br>Errorcode: " . $this->_dbhandle->errorCode() );
$this->PrintDebugError( "Invalid SQL: " . $szSql . "<br><br>Errorcode: " . $this->_dbhandle->errorCode() );
return ERROR_DB_QUERYFAILED;
}
else
@ -1187,16 +1187,14 @@ class LogStreamPDO extends LogStream {
$errdesc = $this->_dbhandle == null ? "" : implode( ";", $this->_dbhandle->errorInfo() );
$errno = $this->_dbhandle == null ? "" : $this->_dbhandle->errorCode();
$errormsg ="<table width=\"600\" align=\"center\" class=\"with_border\"><tr><td>";
$errormsg.="<center><H3><font color='red'>Error: " . $szErrorMsg . "</font></H3><br></center>";
$errormsg ="<font color='red'>Error: " . $szErrorMsg . "</font></H3><br>";
$errormsg.="<B>Errordetails:</B><br>";
$errormsg.="Detail Error: $errdesc <br>";
$errormsg.="Error Code: $errno <br>";
$errormsg.="Date: ".date("d.m.Y @ H:i"). "<br>";
$errormsg.="</td></tr></table>";
//Output!
print( $errormsg );
OutputDebugMessage("LogStreamPDO|CreateMainSQLQuery: $errormsg", DEBUG_ERROR);
}
}

View File

@ -229,7 +229,7 @@ function DB_PrintError($MyErrorMsg, $DieOrNot)
if ($DieOrNot == true)
DieWithErrorMsg( "$linesep" . $errormsg );
else
echo $errormsg;
OutputDebugMessage("DB_PrintError: $errormsg", DEBUG_ERROR);
}
function DB_RemoveParserSpecialBadChars($myString)