Ah, yes! thanks!
Begin forwarded message: Subject: Re: [Omaha.pm] XML::Twig error handling
Date: October 24, 2012 12:26:09 PM CDT
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 . ']]>' );
}
|