C Sharp (C#) - Exception Handling
You have nested try-catch blocks. In the inner catch, you want to add context info to the exception but keep original stack trace. What is the best approach?
throw ex; resets stack trace, throw; rethrows original without added context, and throw new Exception(ex.Message); loses stack trace.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions