Exemplo n.º 1
0
			/// <exception cref="System.Exception"/>
			public override void ExceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
			{
				Org.Jboss.Netty.Channel.Channel ch = e.GetChannel();
				Exception cause = e.GetCause();
				if (cause is TooLongFrameException)
				{
					this.SendError(ctx, HttpResponseStatus.BadRequest);
					return;
				}
				else
				{
					if (cause is IOException)
					{
						if (cause is ClosedChannelException)
						{
							ShuffleHandler.Log.Debug("Ignoring closed channel error", cause);
							return;
						}
						string message = cause.Message.ToString();
						if (ShuffleHandler.IgnorableErrorMessage.Matcher(message).Matches())
						{
							ShuffleHandler.Log.Debug("Ignoring client socket close", cause);
							return;
						}
					}
				}
				ShuffleHandler.Log.Error("Shuffle error: ", cause);
				if (ch.IsConnected())
				{
					ShuffleHandler.Log.Error("Shuffle error " + e);
					this.SendError(ctx, HttpResponseStatus.InternalServerError);
				}
			}