Not being able to load a class that you are trying to use is a very serious error. If you want to use that class then not loading it is not an option. It is too late when you try to use it anand invoke the autoloader. You should not have done any checking beforehandwritten the code that was going to avoid usingrequire a bad class that you don't have.
There are a few options on how you can fail out of autoloading. The standard way is a fatal error. This provides limited options to handle the error. You can only do very basic things within a shutdown_handlershutdown function (set via register_shutdown_function).
It is very easy to display an error page when you catch an exception (This is the appropriate thing to do rather than try to recover from an autoloading failure). This exception gives the signal to the correct place (which is the higher up code that is making the call) rather than an observer which can only guess at what the current execution stack is.
How does it even work?
$filename = strtolower($class) . $extension;
$file = $structure . $extension;
$filename = strtolower($class) . $extension;
$file = $structure . $extension;