if you want this detailed error checking (which you should)
you might be better wrapping this up into a function or even an object...
now you would of course want more than just printing the line out, like email yourself the error, or log it specially... or something....by wrapping this up in a function... and using this for all the errors you expect... you can even throw in a feature that prints out to the screen during debug... and then in production just flip it off in one place...
function myError( $message, $file, $line )
{
die("Error in $file on line $line: $message");
}
do_this or myError('basic error',__FILE__,__LINE__);
you may even want to wrap this up in a class and call it statically...
class MyError
{
function throw( $message, $file, $line )
{
echo "Error in $file on line $line: $message";
}
function fatal( $message, $file, $line )
{
MyError::throw($message, $file, $line);
die();
}
}