For example, in one place...
//---------------a try { // some network call } catch(WebException we) { throw new MyCustomException("some message ....", we); } ...and in another place...
//--------------b try { // invoke code above } catch(MyCustomException we) { Debug.Writeline(we.stacktrace); // <---------------- } The stacktrace I print, it only start from a to b, it doesnt include the inner stacktrace from the WebException.
How can I print all the stacktrace???


throw;in lieu ofthrow new MyCustomException(...)if you want to preserve (and output) the original exception stack.