dacr / jassh

High level scala SSH API for easy and fast operations on remote servers.
Apache License 2.0
71 stars 27 forks source link

SSHFtp#receive provides no operation result status #16

Closed andresilva closed 8 years ago

andresilva commented 9 years ago

The more general receive method in SSHFtp (https://github.com/dacr/jassh/blob/master/src/main/scala/fr/janalyse/ssh/SSHFtp.scala#L86) handles all the exceptions internally and doesn't return any value. This makes it impossible to know whether a file download was successful or not.

I'd recommend either returning a value (a boolean?) or removing the exception handling code so that the caller can deal with the error cases.

Do you think that makes sense?

dacr commented 8 years ago

yes, it makes senses. I leave the log and rethrow the same exception.