Re: [PHP-DEV] Re: Throwable::addSuppressed()

2015-08-01 Thread Markus Malkusch
Christoph Becker: Markus Malkusch wrote: I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: [..] Note that there's an open bug report (https://bugs.php.net/68270) regarding this issue. Thank you for pointing to that bug.

Re: [PHP-DEV] Re: Throwable::addSuppressed()

2015-08-01 Thread Christoph Becker
Markus Malkusch wrote: Markus Malkusch: 2) You are loosing one stack trace I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: try { throw new Exception(A); } finally { throw new Exception(B); } This

Re: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-08-01 Thread Yasuo Ohgaki
Hi Niklas, On Sat, Aug 1, 2015 at 5:50 PM, Niklas Keller m...@kelunik.com wrote: You always assume the developer just wants to fallback to something different. You can't detect the environment btw. because it could just fail because of too many open file descriptors. This is not my

Re: [PHP-DEV] Re: Throwable::addSuppressed()

2015-08-01 Thread Stephen Coakley
On 08/01/2015 09:44 AM, Markus Malkusch wrote: Christoph Becker: Markus Malkusch wrote: I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: [..] Note that there's an open bug report (https://bugs.php.net/68270) regarding

Re: [PHP-DEV] Re: Throwable::addSuppressed()

2015-08-01 Thread Stephen Coakley
On 08/01/2015 09:44 AM, Markus Malkusch wrote: Christoph Becker: Markus Malkusch wrote: I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: [..] Note that there's an open bug report (https://bugs.php.net/68270) regarding

Re: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-08-01 Thread Scott Arciszewski
On Sat, Aug 1, 2015 at 6:37 AM, Nikita Popov nikita@gmail.com wrote: tl;dr: This should definitely throw, but I'm as yet unclear as to *what* it should throw. My gut says zpp should throw Error, length/min/max errors should throw Error and the randomness-not-available condition should throw

RE: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-08-01 Thread Anatol Belski
Hi Anthony, -Original Message- From: Anthony Ferrara [mailto:ircmax...@gmail.com] Sent: Saturday, August 1, 2015 2:34 AM To: Ferenc Kovacs tyr...@gmail.com Cc: Sammy Kaye Powers m...@sammyk.me; internals@lists.php.net; Nikita Popov ni...@php.net Subject: Re: [PHP-DEV] Core

Re: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-08-01 Thread Niklas Keller
2015-08-01 1:43 GMT+02:00 Yasuo Ohgaki yohg...@ohgaki.net: Hi Niklas, On Sat, Aug 1, 2015 at 8:27 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: They should totally be handled. You need to catch the error and throw a defined exception, otherwise your public API will break if you choose to use

Re: [PHP-DEV] Re: Throwable::addSuppressed()

2015-08-01 Thread Markus Malkusch
Markus Malkusch: 2) You are loosing one stack trace I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: try { throw new Exception(A); } finally { throw new Exception(B); } This prints both exceptions: PHP Fatal

Re: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-08-01 Thread Nikita Popov
On Sat, Aug 1, 2015 at 12:34 AM, Ferenc Kovacs tyr...@gmail.com wrote: On Tue, Jul 14, 2015 at 11:04 PM, Sammy Kaye Powers m...@sammyk.me wrote: Hello lovely PHP nerds, There are two open PR's for PHP7 to modify the behavior of the CSPRNG's: https://github.com/php/php-src/pull/1397