diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/EofException.java b/jetty-io/src/main/java/org/eclipse/jetty/io/EofException.java index 29aa5e0c504..93e75f8f630 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/EofException.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/EofException.java @@ -27,7 +27,7 @@ import java.io.EOFException; * the connection, vs and EOF thrown by some application talking to some other file/socket etc. * The only difference in handling is that Jetty EOFs are logged less verbosely. */ -public class EofException extends EOFException +public class EofException extends EOFException implements QuietException { public EofException() { diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/QuietException.java b/jetty-io/src/main/java/org/eclipse/jetty/io/QuietException.java new file mode 100644 index 00000000000..31ec98b12d7 --- /dev/null +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/QuietException.java @@ -0,0 +1,29 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.io; + + +/* ------------------------------------------------------------ */ +/** A Quiet Exception. + *
Exception classes that extend this interface will be logged + * less verbosely. + */ +public interface QuietException +{ +} diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 48f02a0d8bb..f0e6ade514e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -39,6 +39,7 @@ import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.io.ByteBufferPool; import org.eclipse.jetty.io.ChannelEndPoint; import org.eclipse.jetty.io.EndPoint; +import org.eclipse.jetty.io.QuietException; import org.eclipse.jetty.io.RuntimeIOException; import org.eclipse.jetty.server.HttpChannelState.Action; import org.eclipse.jetty.server.handler.ContextHandler; @@ -484,7 +485,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor if (failure instanceof RuntimeIOException) failure = failure.getCause(); - if (failure instanceof QuietServletException || !getServer().isRunning()) + if (failure instanceof QuietException || !getServer().isRunning()) { if (LOG.isDebugEnabled()) LOG.debug(_request.getRequestURI(), failure); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/QuietServletException.java b/jetty-server/src/main/java/org/eclipse/jetty/server/QuietServletException.java index fe64bf675f8..7449f865e4b 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/QuietServletException.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/QuietServletException.java @@ -20,6 +20,8 @@ package org.eclipse.jetty.server; import javax.servlet.ServletException; +import org.eclipse.jetty.io.QuietException; + /* ------------------------------------------------------------ */ /** A ServletException that is logged less verbosely than @@ -29,7 +31,7 @@ import javax.servlet.ServletException; * than a stack trace. *
*/ -public class QuietServletException extends ServletException +public class QuietServletException extends ServletException implements QuietException { public QuietServletException() {