You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/11/14 13:46:36 UTC

[commons-vfs] branch master updated: Add an ExceptionCallback

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new edc0eae4 Add an ExceptionCallback
edc0eae4 is described below

commit edc0eae4e96e1d43dd0d7aca9f70e41f95515f36
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 14 08:46:31 2022 -0500

    Add an ExceptionCallback
---
 .../src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
index a04d3c84..db798d10 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
@@ -256,7 +256,10 @@ public class NHttpFileServer {
                 .build();
         // @formatter:on
 
-        server = bootstrap.setIOReactorConfig(config).register("*", new HttpFileHandler(docRoot)).create();
+        server = bootstrap
+                .setExceptionCallback(e -> e.printStackTrace())
+                .setIOReactorConfig(config)
+                .register("*", new HttpFileHandler(docRoot)).create();
 
         Runtime.getRuntime().addShutdownHook(new Thread(this::close));