Re: HTML::Mason::Exception handler <%method> ?
Scott Lanning <[email protected]> Thu, 13 Mar 2008 09:59:13 +0100 (CET)
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
[this is more for mason-users, n'est-ce pas?]
On Wed, 12 Mar 2008, C.J. Adams-Collier wrote:
> We would like to start throwing and handling exceptions to determine
> the service responsible for causing content problems.
>
> Is it possible to specify a <%method> as a catch block for any
> exceptions thrown within a given lexical scope?
If by "lexical scope" you could mean "component",
then there's HTML::Mason::Plugin whose end_component_hook
can access exceptions thrown during the eval of a component
(or at the end_request_hook level).
For a more general "lexical scope", I guess you could wrap
eval { ... } around the scope and send any $@ to the %method
in the normal ways.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/