35 lines
1012 B
Diff
35 lines
1012 B
Diff
--- Frontier-RPC-0.06/lib/Frontier/RPC2.pm.rawserve Wed Jun 19 17:47:33 2002
|
|
+++ Frontier-RPC-0.06/lib/Frontier/RPC2.pm Wed Jun 19 18:26:04 2002
|
|
@@ -110,7 +110,7 @@
|
|
}
|
|
|
|
sub serve {
|
|
- my $self = shift; my $xml = shift; my $methods = shift;
|
|
+ my $self = shift; my $xml = shift; my $methods = shift; my $raw = shift;
|
|
|
|
my $call;
|
|
# FIXME bug in Frontier's XML
|
|
@@ -118,6 +118,7 @@
|
|
eval { $call = $self->decode($xml) };
|
|
|
|
if ($@) {
|
|
+ die $@ if $raw;
|
|
return $self->encode_fault(1, "error decoding RPC.\n" . $@);
|
|
}
|
|
|
|
@@ -127,12 +128,14 @@
|
|
|
|
my $method = $call->{'method_name'};
|
|
if (!defined $methods->{$method}) {
|
|
+ die "No such method '$method'" if $raw;
|
|
return $self->encode_fault(3, "no such method \`$method'\n");
|
|
}
|
|
|
|
my $result;
|
|
my $eval = eval { $result = &{ $methods->{$method} }(@{ $call->{'value'} }) };
|
|
if ($@) {
|
|
+ die $@ if $raw;
|
|
return $self->encode_fault(4, "error executing RPC \`$method'.\n" . $@);
|
|
}
|
|
|