C# - Capture Full Stack Trace Inside Catch
· ☕ 3 min read
When you catch an exception, you only have stack trace relative to the catch point. Why is this important? Suppose the error occurs when sending email and this is a non-critical part of your application. Let's say you send confirmation emails to clients as part of the ordering process. Yes, it's bad if the email cannot reach your client (say, their email address is invalid), but your web server should not crash because of that.