Re: Stop Exceptions capturing object references for trace arguments

From: Date: Sun, 13 Aug 2017 20:44:32 +0000
Subject: Re: Stop Exceptions capturing object references for trace arguments
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-100207@lists.php.net to get a copy of this message
On 13/08/2017 15:31, Niklas Keller wrote:
If it's explicitly needed, someone could still just call debug_backtrace() and manually store the args in the exception constructor, no?
That depends exactly how it's being used, but yes if you control the throw site or Exception constructor you could grab the backtrace manually.
Would the args still be available in the stringified version? Because they're quite useful for debugging there.
Hm, I guess we'd need to store the string representation (the class name, basically) somewhere so we could keep that. Doesn't seem like it ought to be too hard, unless there's some hidden complexity or performance impact there. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#100207) next »