summaryrefslogtreecommitdiff
path: root/php
diff options
context:
space:
mode:
Diffstat (limited to 'php')
-rw-r--r--php/src/IcePHP/Proxy.cpp19
-rw-r--r--php/test/Slice/keyword/Key.ice1
-rwxr-xr-xphp/test/Slice/keyword/run.py3
3 files changed, 20 insertions, 3 deletions
diff --git a/php/src/IcePHP/Proxy.cpp b/php/src/IcePHP/Proxy.cpp
index 38281878001..b72cf60cf62 100644
--- a/php/src/IcePHP/Proxy.cpp
+++ b/php/src/IcePHP/Proxy.cpp
@@ -2418,6 +2418,8 @@ IcePHP::Operation::throwUserException(Ice::InputStreamPtr& is TSRMLS_DC)
is->readBool(); // usesClasses
string id = is->readString();
+ const string origId = id;
+
while(!id.empty())
{
//
@@ -2455,13 +2457,26 @@ IcePHP::Operation::throwUserException(Ice::InputStreamPtr& is TSRMLS_DC)
else
{
is->skipSlice();
- id = is->readString();
+
+ try
+ {
+ id = is->readString();
+ }
+ catch(Ice::UnmarshalOutOfBoundsException& ex)
+ {
+ //
+ // When readString raises this exception it means we've reached the last slice,
+ // so we set the reason member to a more helpful value.
+ //
+ ex.reason = "unknown exception type `" + origId + "'";
+ throw;
+ }
}
}
//
// Getting here should be impossible: we can get here only if the
// sender has marshaled a sequence of type IDs, none of which we
- // have factory for. This means that sender and receiver disagree
+ // have a factory for. This means that sender and receiver disagree
// about the Slice definitions they use.
//
throw Ice::UnknownUserException(__FILE__, __LINE__);
diff --git a/php/test/Slice/keyword/Key.ice b/php/test/Slice/keyword/Key.ice
index ea28c9397d5..c7f06f2deae 100644
--- a/php/test/Slice/keyword/Key.ice
+++ b/php/test/Slice/keyword/Key.ice
@@ -39,6 +39,7 @@ module and
};
class echo
{
+ int if;
void else(die* elseif, out int empty);
};
class enddeclare extends echo implements die, function
diff --git a/php/test/Slice/keyword/run.py b/php/test/Slice/keyword/run.py
index 6312457ceef..12d908afc77 100755
--- a/php/test/Slice/keyword/run.py
+++ b/php/test/Slice/keyword/run.py
@@ -25,6 +25,7 @@ testdir = os.getcwd()
client = os.path.join(testdir, "Client.php")
print "starting client...",
-clientProc = TestUtil.startClient(client)
+clientProc = TestUtil.startClient(client, startReader = False)
print "ok"
+clientProc.startReader()
clientProc.waitTestSuccess()