|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can't throw exception in calling class.I got a problem using Exceptions in Debug mode in Visual Studio : I got an Exception on a classe like : catch Exception(e) { DoSomething(); throw e; } Running in debug mode when getting this exception works fine, but trying to continue running code intercepting this exception in calling classes doesn't work ; it's coming coming back over and over again on this exception (no way to intercept it upper class methods). Do you have any clue ? Thanks everyone > I got a problem using Exceptions in Debug mode in Visual Studio : I Typically you would wrap the exception in a custom exception and throw the > got an Exception on a classe like : > > catch Exception(e) > { > DoSomething(); > throw e; > } > Running in debug mode when getting this exception works fine, but > trying to continue running code intercepting this exception in calling > classes doesn't work ; it's coming coming back over and over again on > this exception (no way to intercept it upper class methods). new wrapped version as follows: catch Exception(e) { DoSomething(); throw new MyCustomInheritedException(e); } Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx |
|||||||||||||||||||||||