in reply to Re^2: Frontier::Client - script quits on error respons
in thread Frontier::Client - script quits on error respons

The call() method ends like this:

sub call { ... if ($result->{'type'} eq 'fault') { die "Fault returned from XML RPC Server, fault code " . $resul +t->{'value'}[0]{'faultCode'} . ": " . $result->{'value'}[0]{'faultString'} . "\n"; } return $result->{'value'}[0]; }

so, when it dies (raises an exception), you'll get the message "Fault returned from XML RPC Server, fault code ...: ..." in $@.

As you can see, the message includes the faultCode and faultString, so you'd have to extract it from there.

In case there is no fault, it returns whatever is in $result->{'value'}[0].

Replies are listed 'Best First'.
Re^4: Frontier::Client - script quits on error respons
by Anonymous Monk on Apr 27, 2011 at 16:02 UTC
    I'm running into a similar issue, I'm capturing the output of die in $@ but I'd like to extract faultString and faultCode separately. Data Dumper shows the entire message as one variable, is there a way to extract faultString and faultCode separately from this module? Thanks, Vadim
Re^4: Frontier::Client - script quits on error respons
by vadim (Initiate) on Apr 27, 2011 at 16:11 UTC
    I'm running into a similar issue, I'm capturing the output of die in $@ but I'd like to extract faultString and faultCode separately. Data Dumper shows the entire message as one variable, is there a way to extract faultString and faultCode separately from this module? Thanks, Vadim