throw ex
gives the following stack trace. Notice that THIS_METHOD_THROWS()
is missing.
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at ConsoleApplication1.Program.CatchThrowEx() in C:\Code\ConsoleApplication1\ConsoleApplication1\Program.cs:line 54
at ConsoleApplication1.Program.Main() in C:\Code\ConsoleApplication1\ConsoleApplication1\Program.cs:line 12
throw
gives the following stack trace, which helpfully includes THIS_METHOD_THROWS()
where the exception originated.
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at ConsoleApplication1.Program.THIS_METHOD_THROWS() in C:\Code\ConsoleApplication1\ConsoleApplication1\Program.cs:line 60
at ConsoleApplication1.Program.CatchThrow() in C:\Code\ConsoleApplication1\ConsoleApplication1\Program.cs:line 42
at ConsoleApplication1.Program.Main() in C:\Code\ConsoleApplication1\ConsoleApplication1\Program.cs:line 24