Wouldn't Exception::getContext() be useful?

From: Date: Sat, 21 Oct 2017 07:20:00 +0000
Subject: Wouldn't Exception::getContext() be useful?
Groups: php.internals 
Request: Send a blank email to internals+get-100907@lists.php.net to get a copy of this message
Right now the only way I know of to see the context of an exception throw is to pass it in.. throw new CustomException(get_definted_vars()); It would be very useful to have exceptions just have this as a method. set_error_handle had this ability, but it's now deprecated. I'm guessing there's an engine reason why this hasn't happened because it seems like a pretty obvious include to the default methods of the Exception and Error objects.

« previous php.internals (#100907) next »