Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw specific exceptions at least for connect and authentication #357

Closed
erik-wramner opened this issue Jul 9, 2023 · 0 comments
Closed
Labels
enhancement New feature or request
Milestone

Comments

@erik-wramner
Copy link

JSch always throws the same checked exception for any errors. In some cases that is fine, but in others it is a pain. Specifically, when connecting to a host, it would be nice to know if the connection fails because the host does not exist or is down or if a TCP connection was established and something went wrong in a later stage. It would also be very useful to know if the connection failed due to an invalid user or password, as the application should typically not retry (again - the library itself retries authentications) as that can lock the account.

Gradually converting the code to throw sub-classes of the existing exception with known meanings would be a great improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants