Handles uncaught PHP exceptions if something is not taken care of by the application code.