| От | Andrew Dunstan |
|---|---|
| Тема | Re: Error handling in plperl and pltcl |
| Дата | |
| Msg-id | 41ACA3C4.8030802@dunslane.net обсуждение исходный текст |
| Ответ на | Re: Error handling in plperl and pltcl (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
Tom Lane wrote: > >In the case of Perl I suspect it is reasonably possible to determine >whether there is an "eval" surrounding the call or not, although we >might have to get more friendly with Perl's internal data structures >than a purist would like. > > Not really very hard. (caller(0))[3] should have the value "(eval)" if you are in an eval. There might also be some ways of getting this via the perlguts API although I'm not aware of it. Of course, if you're in a subroutine which is in turn called from an eval things get trickier, so we might have to walk the stack frames a bit. cheers andrew
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера