diff options
Diffstat (limited to 'csharp/src/Ice/DispatchInterceptor.cs')
-rw-r--r-- | csharp/src/Ice/DispatchInterceptor.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/csharp/src/Ice/DispatchInterceptor.cs b/csharp/src/Ice/DispatchInterceptor.cs index 665b504ef3e..54e39251ac6 100644 --- a/csharp/src/Ice/DispatchInterceptor.cs +++ b/csharp/src/Ice/DispatchInterceptor.cs @@ -26,7 +26,23 @@ namespace Ice public override System.Threading.Tasks.Task<OutputStream> iceDispatch(IceInternal.Incoming inc, Current current) { - return dispatch(inc); + try + { + return dispatch(inc); + } + catch(Exception) + { + // + // If the input parameters weren't read, make sure we skip them here. It's needed to read the + // encoding version used by the client to eventually marshal the user exception. It's also needed + // if we dispatch a batch oneway request to read the next batch request. + // + if(current.encoding == null || (current.encoding.major == 0 && current.encoding.minor == 0)) + { + inc.skipReadParams(); + } + throw; + } } } } |