org.apache.commons.httpclient.util
Class ExceptionUtil
java.lang.Object
org.apache.commons.httpclient.util.ExceptionUtil
public class ExceptionUtil
extends java.lang.Object
The home for utility methods that handle various exception-related tasks.
static void | initCause(Throwable throwable, Throwable cause) - If we're running on JDK 1.4 or later, initialize the cause for the given throwable.
|
static boolean | isSocketTimeoutException(InterruptedIOException e) - If SocketTimeoutExceptionClass is defined, returns true only if the
exception is an instance of SocketTimeoutExceptionClass.
|
initCause
public static void initCause(Throwable throwable,
Throwable cause)
If we're running on JDK 1.4 or later, initialize the cause for the given throwable.
throwable
- The throwable.cause
- The cause of the throwable.
isSocketTimeoutException
public static boolean isSocketTimeoutException(InterruptedIOException e)
If SocketTimeoutExceptionClass is defined, returns true only if the
exception is an instance of SocketTimeoutExceptionClass. If
SocketTimeoutExceptionClass is undefined, always returns true.
e
- an instance of InterruptedIOException class.
- true if the exception signals socket timeout, false
otherwise.
Copyright (c) 1999-2005 - Apache Software Foundation