in reply to Error handling on_fault and return params to the caller file (abc.mp)
Here's what I do:
$soap->on_fault( sub { my ( $soap, $res ) = @_; if ($res) { if ( ref $res ) { die join( '; ', $res->faultcode, $res->faultstring +, $res->faultdetail ) . "\n"; } else { die $res; } } else { die "Soap Fault: " . $soap->transport->status . "\n"; } } );
Then later in the client...
eval { $soap->Method("arguments"); }; if ($@) { // provide some user feedback about the error in $@ }
mr.nick ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error handling on_fault and return params to the caller file (abc.mp)
by nitins818@gmail.com (Initiate) on Aug 20, 2012 at 09:32 UTC | |
by Anonymous Monk on Aug 20, 2012 at 09:47 UTC |