/*
 * Created on Aug 19, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package com.jscape.inet.sftp;

import com.jscape.inet.sftp.protocol.v3.messages.StatusCode;
import com.jscape.util.SuppressObfuscation;

/**
 * Exception is thrown when attempting to retrieve a file from server that does not exist.
 */
@SuppressObfuscation
public class SftpFileNotFoundException
        extends RequestException {

    private String filename;

    /**
     * Creates a new SftpException instance.
     *
     * @param filename the filename that caused this exception
     */
    public SftpFileNotFoundException(String filename) {
        super(StatusCode.SSH_FX_NO_SUCH_FILE.code, "File or directory not found.");
        this.filename = filename;
    }

    /**
     * Gets filename that caused this exception
     *
     * @return the filename
     */
    public String getFilename() {
        return filename;
    }
}
