Package com.trilead.ssh2
Class SFTPException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.trilead.ssh2.SFTPException
-
- All Implemented Interfaces:
java.io.Serializable
public class SFTPException extends java.io.IOException
Used in combination with the SFTPv3Client. This exception wraps error messages sent by the SFTP server.- Version:
- $Id: SFTPException.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private int
sftpErrorCode
private java.lang.String
sftpErrorMessage
-
Constructor Summary
Constructors Constructor Description SFTPException(java.lang.String msg, int errorCode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
constructMessage(java.lang.String s, int errorCode)
int
getServerErrorCode()
Get the error code sent by the server.java.lang.String
getServerErrorCodeSymbol()
Get the symbolic name of the error code as given in the SFTP specs.java.lang.String
getServerErrorCodeVerbose()
Get the description of the error code as given in the SFTP specs.java.lang.String
getServerErrorMessage()
Get the error message sent by the server.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
sftpErrorMessage
private final java.lang.String sftpErrorMessage
-
sftpErrorCode
private final int sftpErrorCode
-
-
Method Detail
-
constructMessage
private static java.lang.String constructMessage(java.lang.String s, int errorCode)
-
getServerErrorMessage
public java.lang.String getServerErrorMessage()
Get the error message sent by the server. Often, this message does not help a lot (e.g., "failure").- Returns:
- the plain string as sent by the server.
-
getServerErrorCode
public int getServerErrorCode()
Get the error code sent by the server.- Returns:
- an error code as defined in the SFTP specs.
-
getServerErrorCodeSymbol
public java.lang.String getServerErrorCodeSymbol()
Get the symbolic name of the error code as given in the SFTP specs.- Returns:
- e.g., "SSH_FX_INVALID_FILENAME".
-
getServerErrorCodeVerbose
public java.lang.String getServerErrorCodeVerbose()
Get the description of the error code as given in the SFTP specs.- Returns:
- e.g., "The filename is not valid."
-
-