Tim Starling wrote (on 08/10/2013):
Is it possible to make the trace options be overridable by the
Exception subclass? That would provide a migration path for any code
that did rely on the args being available. And I think our app could
benefit from having closure objects available for logging, especially
if it is possible to get line numbers.
-- Tim Starling
The problem with that is that you can't control what exceptions are
thrown by third-party libraries (or even some of the newer core
extensions), or force them to inherit from your base. If they turn off
the argument capture, the information will already be unavailable when
you catch the exception, and if they turn it on, you will still need a
function to strip it after the fact.
Obviously you can discard the third-party exception and throw your own,
but normally you would chain yours onto it, retaining whatever
information it originally contained.
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php