[Omaha.pm] Fwd: XML::Twig error handling
Jay Hannah
jay at jays.net
Wed Oct 24 10:50:46 PDT 2012
Ah, yes! thanks!
Begin forwarded message:
> From: Patrick Baker <pbaker0804 at gmail.com>
> Subject: Re: [Omaha.pm] XML::Twig error handling
> Date: October 24, 2012 12:26:09 PM CDT
> To: Jay Hannah <jay at jays.net>
>
> I use try { } catch { }; now, it seems cleaner to me.
>
> try {
> $twig->parse($request);
> $self->request($twig);
> my ($Body) = $twig->get_xpath("${soap_base}:Body");
> my ($request) = $Body->first_child('GroupPricing');
> $self->type($request->tag);
> } catch {
> $self->set_SOAP_Fault( faultstring => "Invalid message.",
> detail => '<![CDATA[' . $_ . "\n" . $request . ']]>' );
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20121024/ea5a4e70/attachment.html>
More information about the Omaha-pm
mailing list