public class

SFTPException

extends IOException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.io.IOException
         ↳ com.trilead.ssh2.SFTPException

Class Overview

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

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class java.io.IOException
From class java.lang.Exception
From class java.lang.Throwable
Fields
private final int sftpErrorCode
private final String sftpErrorMessage
[Expand]
Inherited Fields
From class java.lang.Throwable
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: 578654644222421811 (0x0807cb554481eb33)

Fields

private final int sftpErrorCode

private final String sftpErrorMessage

Public Methods

public int getServerErrorCode ()

Get the error code sent by the server.

Returns
  • an error code as defined in the SFTP specs.

public String getServerErrorCodeSymbol ()

Get the symbolic name of the error code as given in the SFTP specs.

Returns
  • e.g., "SSH_FX_INVALID_FILENAME".

public String getServerErrorCodeVerbose ()

Get the description of the error code as given in the SFTP specs.

Returns
  • e.g., "The filename is not valid."

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.