internal IMessage FormatFault (SoapFault fault, IMethodCallMessage mcm)
		{
			ServerFault sf = fault.Detail as ServerFault;
			Exception e = null;
			
			if (sf != null) {
				if(_serverFaultExceptionField != null)
					e = (Exception) _serverFaultExceptionField.GetValue(sf);
			}
			if (e == null)
				e = new RemotingException (fault.FaultString);

			return new ReturnMessage((System.Exception)e, mcm);
		}
		internal IMessage FormatFault (SoapFault fault, IMethodCallMessage mcm)
		{
			ServerFault sf = fault.Detail as ServerFault;
			Exception e = null;
			
			if (sf != null) {
				if(_serverFaultExceptionField != null)
					e = (Exception) _serverFaultExceptionField.GetValue(sf);
#if TARGET_JVM				
				if (e == null && sf.ExceptionType != null)
				{
					try
					{
						Type te = Type.GetType(sf.ExceptionType);
						if (te != null)
						{
							ConstructorInfo ce = te.GetConstructor(
								BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.CreateInstance,
								null, new Type[] {typeof(string)}, null);

							if (ce != null)
							{
								e = (Exception) ce.Invoke(new object[] {sf.ExceptionMessage});
							}
							else
							{
								e = (Exception) Activator.CreateInstance(te);
							}
						}
					}
					catch
					{
						e = null;
					}
				}
#endif
			}
			if (e == null)
				e = new RemotingException (fault.FaultString);

			return new ReturnMessage((System.Exception)e, mcm);
		}
 public override void AfterThrowing(RemotingException ex)
 {
     base.AfterThrowing(ex);
     throw exception;
 }
 public void AfterThrowing(RemotingException ex)
 {
 }
 public void AfterThrowing(
     MethodInfo method, object[] args, object target, RemotingException ex)
 {
 }
示例#6
0
 public virtual void AfterThrowing(RemotingException ex)
 {
     Count("RemotingException");
 }
示例#7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private static void preProcess(ResponseCommand responseCommand, String addr) throws exception.RemotingException
        private static void preProcess(ResponseCommand responseCommand, string addr)
        {
            RemotingException e   = null;
            string            msg = null;

            if (responseCommand == null)
            {
                msg = string.Format("Rpc invocation timeout[responseCommand null]! the address is {0}", addr);
                e   = new InvokeTimeoutException(msg);
            }
            else
            {
                switch (responseCommand.ResponseStatus)
                {
                case ResponseStatus.TIMEOUT:
                    msg = string.Format("Rpc invocation timeout[responseCommand TIMEOUT]! the address is {0}", addr);
                    e   = new InvokeTimeoutException(msg);
                    break;

                case ResponseStatus.CLIENT_SEND_ERROR:
                    msg = string.Format("Rpc invocation send failed! the address is {0}", addr);
                    e   = new InvokeSendFailedException(msg, responseCommand.Cause);
                    break;

                case ResponseStatus.CONNECTION_CLOSED:
                    msg = string.Format("Connection closed! the address is {0}", addr);
                    e   = new ConnectionClosedException(msg);
                    break;

                case ResponseStatus.SERVER_THREADPOOL_BUSY:
                    msg = string.Format("Server thread pool busy! the address is {0}, id={1}", addr, responseCommand.Id);
                    e   = new InvokeServerBusyException(msg);
                    break;

                case ResponseStatus.CODEC_EXCEPTION:
                    msg = string.Format("Codec exception! the address is {0}, id={1}", addr, responseCommand.Id);
                    e   = new CodecException(msg);
                    break;

                case ResponseStatus.SERVER_SERIAL_EXCEPTION:
                    msg = string.Format("Server serialize response exception! the address is {0}, id={1}, serverSide=true", addr, responseCommand.Id);
                    e   = new SerializationException(detailErrMsg(msg, responseCommand), toThrowable(responseCommand), true);
                    break;

                case ResponseStatus.SERVER_DESERIAL_EXCEPTION:
                    msg = string.Format("Server deserialize request exception! the address is {0}, id={1}, serverSide=true", addr, responseCommand.Id);
                    e   = new DeserializationException(detailErrMsg(msg, responseCommand), toThrowable(responseCommand), true);
                    break;

                case ResponseStatus.SERVER_EXCEPTION:
                    msg = string.Format("Server exception! Please check the server log, the address is {0}, id={1}", addr, responseCommand.Id);
                    e   = new InvokeServerException(detailErrMsg(msg, responseCommand), toThrowable(responseCommand));
                    break;

                default:
                    break;
                }
            }
            if (!string.IsNullOrWhiteSpace(msg))
            {
                logger.LogWarning(msg);
            }
            if (null != e)
            {
                throw e;
            }
        }
 public RemotingResponseError(uint requestId, object methodKey, RemotingException remotingException)
 {
     this.RequestId = requestId;
     this.MethodKey = methodKey;
     this.Exception = remotingException;
 }
 public LocalExecutionExceptionEventArgs(RemotingException exception, ExecutionRequest request) : this()
 {
     this.Exception = exception;
     this.Request   = request;
 }
 public RemoteExecutionExceptionEventArgs(ExecutionRequest remotingRequest, RemotingException exception)
 {
     this.Request   = remotingRequest;
     this.Exception = exception;
 }