Hello!
I’ve made another version that I believe is what Sebastian intended in the first place: Throwable as an interface, with Exception and Error being separate classes. Throwable is implemented to prevent user-land code from implementing it.
https://github.com/trowski/php-src/tree/throwable-interface
Should I just submit that as a separate pull on GitHub and we can discuss it?
Aaron Piotrowski
aaron@icicle.io
Hi!
I’ve made another version that I believe is what Sebastian intended
in the first place: Throwable as an interface, with Exception and
Error being separate classes. Throwable is implemented to prevent
user-land code from implementing it.
Thanks!
Should I just submit that as a separate pull on GitHub and we can
discuss it?
Yes, please do. Having multiple pulls in github is no problem, we'll
close them once we're done.
--
Stas Malyshev
smalyshev@gmail.com
Submitted the pull request: https://github.com/php/php-src/pull/1284 https://github.com/php/php-src/pull/1284
I’m not 100% sure on using the name Error, but Java uses a similar name scheme, so it isn’t without precedent and it keeps the names shorter.
I also have a branch that prevents user space code from instigating Error so only the engine can throw Errors. I wasn’t sure if this was desired behavior so I left it out of the PR for now.
(Sorry for originally sending this to you directly Stas, I’m new to the list and thought I could just hit reply.)
Hi!
I’ve made another version that I believe is what Sebastian intended
in the first place: Throwable as an interface, with Exception and
Error being separate classes. Throwable is implemented to prevent
user-land code from implementing it.Thanks!
Should I just submit that as a separate pull on GitHub and we can
discuss it?Yes, please do. Having multiple pulls in github is no problem, we'll
close them once we're done.--
Stas Malyshev
smalyshev@gmail.com