Skip to content

Commit

Permalink
Update exception messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
misagh committed Jan 22, 2016
1 parent 8d7227f commit 035a580
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Sftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function connection($url, $username, $password)

if (@ssh2_auth_password($connection, $username, $password) === false)
{
throw new SftpAuthenticationException("Invalid username or password for sftp.");
throw new SftpAuthenticationException("Invalid sftp username/password.");
}

return ssh2_sftp($connection);
Expand All @@ -68,7 +68,7 @@ public function uploadFile($content, $file_name, $path = '/')
{
if (@file_put_contents("ssh2.sftp://{$this->sftp}{$path}{$file_name}", $content) === false)
{
throw new SftpGeneralException("Could not upload file to this path : {$path}");
throw new SftpGeneralException("Could not upload file to this path: '{$path}'");
}

return true;
Expand Down Expand Up @@ -104,7 +104,7 @@ public function fileFinder($file_name, $path = '/')
}
}

throw new SftpFileNotFoundException("Could not Find {$file_name} file from this path : {$path}");
throw new SftpFileNotFoundException("Could not find '{$file_name}' file from this path: '{$path}'");
}

/**
Expand All @@ -125,7 +125,7 @@ public function downloadFile($file_name, $path = '/')
$stream = @fopen($destination, 'r');
if (! $stream)
{
throw new SftpGeneralException("Could not open {$file_name} file from sftp.");
throw new SftpGeneralException("Could not open '{$file_name}' file from sftp.");
}

$size = filesize($destination);
Expand Down

0 comments on commit 035a580

Please sign in to comment.