[FX.php List] How do you handle errors?

Gjermund Gusland Thorsen ggt667 at gmail.com
Thu Apr 17 04:37:05 MDT 2008


Here is a way to track them down:

// Obviously I already ran a query up here that I would like to log...

if( $r['errorCode'] != 0 ) {
	$q = new FX( $serverIP, $webCompanionPort, $dataSourceType );
	$q->SetDBData( $database, 'phpQueryLogg' );
	$q->SetDBPassword( $webPW, $webUN );
	$q->AddDBParam( 'queryExecuted', $r['URL'] );
	$q->AddDBParam( 'errorCode', $r['errorCode'] );
	$q->AddDBParam( 'post', var_export( $_POST, true ) );
	$q->AddDBParam( 'get', var_export( $_GET, true ) );
	$q->AddDBParam( 'server', var_export( $_SERVER, true ) );
	$q->AddDBParam( 'cookie', var_export( $_COOKIE, true ) );
	$q->AddDBParam( 'session', var_export( $_SESSION, true ) );
	$r = $q->FMNew();
}


More information about the FX.php_List mailing list