Re: Show backtrace when tap tests fail

From: David Steele <david(at)pgmasters(dot)net>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Show backtrace when tap tests fail
Date: 2017-09-20 11:39:01
Message-ID: c85cc804-b312-ea25-15e5-5fb6f8f34926@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/20/17 6:26 AM, Dagfinn Ilmari Mannsåker wrote:
> Craig Ringer <craig(at)2ndquadrant(dot)com> writes:
>
>> On 20 September 2017 at 06:36, David Steele <david(at)pgmasters(dot)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(at)pgmasters(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-09-20 11:45:20 Re: Page Scan Mode in Hash Index
Previous Message Robert Haas 2017-09-20 11:26:42 Re: Page Scan Mode in Hash Index