Improved exception handling in HttpSender.

This commit is contained in:
Simone Bordet 2013-07-15 10:45:16 +02:00
parent 1fa4a47f1d
commit bf47119109
2 changed files with 14 additions and 3 deletions

View File

@ -462,6 +462,18 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
@Override
public void succeeded()
{
try
{
process();
}
catch (Exception x)
{
anyToFailure(x);
}
}
private void process() throws Exception
{
HttpExchange exchange = getHttpExchange();
if (exchange == null)

View File

@ -18,7 +18,6 @@
package org.eclipse.jetty.client.http;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.eclipse.jetty.client.HttpClient;
@ -115,7 +114,7 @@ public class HttpSenderOverHTTP extends HttpSender
}
}
}
catch (Throwable x)
catch (Exception x)
{
LOG.debug(x);
content.failed(x);
@ -173,7 +172,7 @@ public class HttpSenderOverHTTP extends HttpSender
}
}
}
catch (IOException x)
catch (Exception x)
{
LOG.debug(x);
content.failed(x);