Renci.SshNet.Sftp.SftpSession.GetSftpException C# (CSharp) Method

GetSftpException() private static method

private static GetSftpException ( SftpStatusResponse response ) : SshException
response Renci.SshNet.Sftp.Responses.SftpStatusResponse
return Renci.SshNet.Common.SshException
        private static SshException GetSftpException(SftpStatusResponse response)
        {
            switch (response.StatusCode)
            {
                case StatusCodes.Ok:
                    return null;
                case StatusCodes.PermissionDenied:
                    return new SftpPermissionDeniedException(response.ErrorMessage);
                case StatusCodes.NoSuchFile:
                    return new SftpPathNotFoundException(response.ErrorMessage);
                default:
                    return new SshException(response.ErrorMessage);
            }
        }