On 9/20/17 6:26 AM, Dagfinn Ilmari Mannsåker wrote:
> Craig Ringer <craig@2ndquadrant.com> writes:
>
>> On 20 September 2017 at 06:36, David Steele <david@pgmasters.net> wrote:
>>
>>>
>>> I just use:
>>>
>>> $SIG{__DIE__} = sub {Carp::confess @_};
>
> That is the basic idea behind both Carp::Always and Devel::Confess, but
> they also avoid breaking non-string exceptions (references and objects)
> being thrown and caught. Devel::Confess jumps through even more hoops
> to add backtraces to these without breaking code catching them.
I see. My object exceptions are always confessed so this code is just
to catch random die's from parts of the code I can't control. I have
never seen one of them throw a non-string exception before.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers