Package org.globus.ftp.exception
Class FTPException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.globus.ftp.exception.FTPException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientException
,DataChannelException
,FTPReplyParseException
,PerfMarkerException
,ServerException
,UnexpectedReplyCodeException
Most exceptions used by ftp package are subclasses of FTPException and inherit its features:
- exception code can be used to more precisely identify the problem. Exception codes are defined within each exception class (look at the source code). For example, in ClientException, code 8 (ClientException.BAD_MODE) indicates that client refused operation because of bad transfer mode, while code 13 (ClientException.BAD_TYPE) indicates that the same thing was caused by bad transfer type. To programmatically retrieve the exception code, use exception.getCode().
- exception nesting can be used to track the root of the exceptions that come from lower software layers. Use getRootCause().
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
getCodeExplanation
(int code) Retrieve the nested lower layer exception.void
void
void
void
setCode
(int c) void
void
toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Field Details
-
UNSPECIFIED
public static final int UNSPECIFIED- See Also:
-
code
protected int code -
cause
-
customMessage
-
-
Constructor Details
-
FTPException
-
FTPException
public FTPException(int code)
-
-
Method Details
-
getCodeExplanation
-
setRootCause
-
getRootCause
Retrieve the nested lower layer exception. -
setCode
public void setCode(int c) -
getCode
public int getCode() -
setCustomMessage
-
getCustomMessage
-
getMessage
- Overrides:
getMessage
in classThrowable
-
toString
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-