File tree Expand file tree Collapse file tree
src/main/java/com/github/dockerjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import java .util .concurrent .CountDownLatch ;
99import java .util .concurrent .TimeUnit ;
1010
11+ import org .slf4j .Logger ;
12+ import org .slf4j .LoggerFactory ;
13+
1114import com .github .dockerjava .api .async .ResultCallback ;
1215
1316/**
1821 */
1922public abstract class ResultCallbackTemplate <T > implements ResultCallback <T > {
2023
24+ private final static Logger LOGGER = LoggerFactory .getLogger (ResultCallbackTemplate .class );
25+
2126 private final CountDownLatch finished = new CountDownLatch (1 );
2227
2328 private Closeable stream ;
@@ -34,6 +39,7 @@ public void onNext(T object) {
3439 @ Override
3540 public void onError (Throwable throwable ) {
3641 try {
42+ LOGGER .error ("Error during callback" , throwable );
3743 throw new RuntimeException (throwable );
3844 } finally {
3945 try {
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ public Void call() throws Exception {
4848 resultCallback .onError (e .getCause ());
4949 }
5050 return null ;
51+ } catch (Exception e ) {
52+ if (resultCallback != null ) {
53+ resultCallback .onError (e );
54+ }
55+ return null ;
5156 }
5257
5358 try {
You can’t perform that action at this time.
0 commit comments