-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore certain exception logging for UI server.
- Loading branch information
1 parent
6dc7a15
commit 70c6c61
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package core.webui.server; | ||
|
||
import java.io.IOException; | ||
|
||
import org.apache.http.ExceptionLogger; | ||
|
||
/** | ||
* Logger that ignores certain commonly encountered (but harmless) exceptions. | ||
*/ | ||
public class UIServerExceptionLogger implements ExceptionLogger { | ||
@Override | ||
public void log(Exception arg0) { | ||
if (arg0 instanceof IOException) { | ||
if (arg0.getLocalizedMessage().contains("An established connection was aborted by the software in your host machine")) { | ||
return; | ||
} | ||
} | ||
|
||
arg0.printStackTrace(); | ||
} | ||
} |