What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the Exception object\'s InnerException
Exception
InnerException
I would definitely use:
try { //some code } catch { //you should totally do something here, but feel free to rethrow //if you need to send the exception up the stack. throw; }
That will preserve your stack.