What are the best practices for usage of PHP’s Magic Constants, such as __LINE__ , __FILE__, __FUNCTION__, __CLASS__ and __METHOD__?
For example I use __LINE__  and __CLASS__ to locate the SQL Error like this :
$result = mysql_query($query)
or die("Error SQL line ".__LINE__ ." class ".__CLASS__." : ".mysql_error());
Is this an acceptable practice?