I'm looking for a general way to handle session_start errors, not a way to deal with one specific error. There are many errors that can occur, such as a full session directory, that cause a fatal error. I want to catch these errors and handle them cleanly, without having to write custom handlers for every opportunity.
Something like this (but not this, as it does not work):
try{ session_start(); }catch(Exception $e){ echo $e->getMessage(); }
All help is appreciated, thanks in advance.
source share