Re: [HACKERS] Show backtrace when tap tests fail

Поиск
Список
Период
Сортировка
От ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Тема Re: [HACKERS] Show backtrace when tap tests fail
Дата
Msg-id d8jmv5pekd5.fsf@dalvik.ping.uio.no
обсуждение исходный текст
Ответ на Re: [HACKERS] Show backtrace when tap tests fail  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: [HACKERS] Show backtrace when tap tests fail  (David Steele <david@pgmasters.net>)
Список pgsql-hackers
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.

See the DESCRIPTION and CAVEATS sections (and the source, if you've got
a strong stomach) of https://metacpan.org/pod/Devel::Confess for some of
the hairy details.

> That's what I patched into my TestLib.pm too, until I learned of
> Carp::Always.
>
> I'd rather have Carp::Always, but it's definitely an OK fallback.

I agree with Tom that we should just go for Devel::Confess with no
fallbacks (because of the above-mentioned potential breakage).  This is
mainly for the convenience of developers and the buildfarm, not end
users.

- ilmari
-- 
- Twitter seems more influential [than blogs] in the 'gets reported in the mainstream press' sense at least.
  - Matt McLeod
 
- That'd be because the content of a tweet is easier to condense down to a mainstream media article.
 - Calle Dybedahl
 


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Page Scan Mode in Hash Index