com.trilead.ssh2

Class SFTPException


public class SFTPException
extends IOException

Used in combination with the SFTPv3Client. This exception wraps error messages sent by the SFTP server.

Method Summary

int
getServerErrorCode()
Get the error code sent by the server.
String
getServerErrorCodeSymbol()
Get the symbolic name of the error code as given in the SFTP specs.
String
getServerErrorCodeVerbose()
Get the description of the error code as given in the SFTP specs.
String
getServerErrorMessage()
Get the error message sent by the server.

Method Details

getServerErrorCode

public int getServerErrorCode()
Get the error code sent by the server.
Returns:
an error code as defined in the SFTP specs.

getServerErrorCodeSymbol

public 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 String getServerErrorCodeVerbose()
Get the description of the error code as given in the SFTP specs.
Returns:
e.g., "The filename is not valid."

getServerErrorMessage

public 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.