© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•10mo ago•
15 replies
nebula

✅ Issue with try/catch block

I am trying to catch an exception, null the bad value, and throw the exception again so the code that calls this function can handle it. I've attached screenshots of both sections of code. It's saying that the exception is unhandled even though I am using try/except blocks to catch SshAuthenticationException in both. Changing the exception to catch just Exception does not fix this. I must be missing something here.
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

exception subclass for try-catch block [Answered]
C#CC# / help
4y ago
✅ try catch
C#CC# / help
3y ago
✅ Try catch exception.
C#CC# / help
13mo ago