Q:

Extending Exception class and logging / emailing

I am trying to extend the exception class, in order to log and email when specify error codes are passed - I would like all the errors thrown to be of the custom exception type for diagnosis - The problem I am running into is how do I tackle when either the email or the logger class fails for any reason 
I am thinking I would need to revert to the default Exception in the case of the email or logger class, while for everything else the custom Exception will be used 
Any help would be appreciated 

A:

The problem I am running into is how do I tackle when either the email or the logger class fails for any reason

wrap the mail/log attempt in a try-catch block.
try{
    myExceptionClass::logException( $customException );
    myExceptionClass::emailNotification( $adminEmail );
}catch( Exception $e ){
    exit( "dangit" );
}

Ideally, your error-handling will never allow this to actually happen, so you should be able to consider it an "edge case."  I assume you are still allowing the server to log your PHP errors as well, so you still have something to use to find such a problem.

