PHP Pre-Processing with XMake: Quality Control |
>> << Error Handling in PHP Sources |
POOR:
<?php
// echo always goes to STDOUT
echo("file doesn't exist\n");
exit(1);
?>
PREFERRED:
<?php
// XMake displays on STDERR and exits, at build time
trigger_error("file doesn't exist",E_USER_ERROR );
?>
>> << Copyright (c) 2003, Gregory Keranen. All rights reserved. |