AxKit::XSP::Exception - Exceptions taglib for eXtensible Server Pages |
AxKit::XSP::Exception - Exceptions taglib for eXtensible Server Pages
Add the sendmail: namespace to your XSP <xsp:page
> tag:
<xsp:page language="Perl" xmlns:xsp="http://apache.org/xsp/core/v1" xmlns:except="http://axkit.org/NS/xsp/exception/v1" >
And add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::XSP::Exception
Allows you to catch exceptions thrown by either your own code, or other taglibs.
This example shows all the tags in action:
<except:try> <mail:send-mail>...</mail:send-mail> <except:catch class="Some::Exception::Class"> <!-- Handle this error differently. --> </except:catch> <except:catch> <!-- all uncaught errors get caught here --> <p>An Error occured: <except:message/></p> </except:catch> </except:try>
Matt Sergeant, matt@axkit.com
Copyright (c) 2001 AxKit.com Ltd. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AxKit
AxKit::XSP::Exception - Exceptions taglib for eXtensible Server Pages |