[TYPO3-dev] Exceptions
Dmitry Dulepov [typo3]
dmitry at typo3.org
Mon Aug 18 12:10:46 CEST 2008
Hi!
Steffen Kamper wrote:
> Ingo started in core with Exceptions. Now while reading documentation i
> found this piece of code in examples that vonverts php notices and
> errors to exceptions:
>
> set_error_handler(create_function('$x, $y', 'throw new Exception($y,
> $x);'), E_ALL & ~E_NOTICE);
>
> Because core throws many Notices, this may help to created a good
> exception handler which isn't done yet.
Exceptions is a good thing. But I'd like to see benefits of having this handler. I am not against it, I simply want to see purpose before it is made :) You know, every feature should have some kind of idea behind it :) So, benefits are:
1. ....
2. ....
I definitely see this handler as central function with a way to call user functions inside. Logging extensions is a good candidate for hooking into exception handler. So it should be a bit more sophisticated than create_function ;)
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/typo3_code_formatting_in_eclipse/
More information about the TYPO3-dev
mailing list