Catching Throwable instead of Exception.

This commit is contained in:
Simone Bordet 2014-08-08 18:16:56 +02:00
parent 5da39140df
commit 3ace246cff
6 changed files with 7 additions and 8 deletions

View File

@ -174,7 +174,7 @@ public class HttpContent implements Callback, Closeable
if (iterator instanceof Closeable)
((Closeable)iterator).close();
}
catch (Exception x)
catch (Throwable x)
{
LOG.ignore(x);
}

View File

@ -489,7 +489,7 @@ public class HttpRequest implements Request
listener.onContent(response, content);
callback.succeeded();
}
catch (Exception x)
catch (Throwable x)
{
callback.failed(x);
}

View File

@ -643,8 +643,7 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
content.succeeded();
process();
}
// Catch-all for runtime exceptions
catch (Exception x)
catch (Throwable x)
{
anyToFailure(x);
}

View File

@ -238,7 +238,7 @@ public interface Response
onContent(response, content);
callback.succeeded();
}
catch (Exception x)
catch (Throwable x)
{
callback.failed(x);
}

View File

@ -180,7 +180,7 @@ public class HttpSenderOverHTTP extends HttpSender
}
}
}
catch (Exception x)
catch (Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug(x);

View File

@ -131,7 +131,7 @@ public class PathContentProvider extends AbstractTypedContentProvider
close();
throw x;
}
catch (Exception x)
catch (Throwable x)
{
close();
throw (NoSuchElementException)new NoSuchElementException().initCause(x);
@ -152,7 +152,7 @@ public class PathContentProvider extends AbstractTypedContentProvider
if (channel != null)
channel.close();
}
catch (Exception x)
catch (Throwable x)
{
LOG.ignore(x);
}