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

Jonathan Schwartz jschwartz at exit445.com
Sat Apr 19 18:03:24 MDT 2008


ggt:

Thank for this script.  It really helps tell the story when things go 
south.  I've incorporated these elements into my regular log script, 
recording them when an error is encountered.

Thanks!

Jonathan

At 12:37 PM +0200 4/17/08, Gjermund Gusland Thorsen wrote:
>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();
>}
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852


More information about the FX.php_List mailing list