vasilvv@gmail.com wrote in message news:478A48C7.30007@gmail.com...
Simetrical writes:
On Jan 13, 2008 8:31 AM, VasilievVV
vasilvv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
These hooks are supposed to replace all error message.
They shouldn't, if they're meant to be pretty. Any error message meant to be pretty should use the current skin if available. The best way to do this would be to just adjust Exception.php so it uses $wgOut, if that's available and the exception wasn't thrown while processing another exception (to avoid loops). There's no need for a hook here at all, in my opinion. Also, if there is, why are you using an entirely new mechanism with its own global and function calls and registration convention instead of the existing hook mechanism?
Note, that when exception is raised, $wgOut may not be initialized, so sometimes it's not possible to use it.
As mentioned ("so it uses $wgOut, if that's available")
Also, wfRunHooks may raise exceptions itself, so it's neccesary to use another mechanism instead of hooks.
As mentioned ("and the exception wasn't thrown while processing another exception (to avoid loops).")
- Mark Clements (HappyDog)