I have a test program which I'm using to print out a bunch of information about some types that I am implementing. It basically enumerates all of the properties and methods on an object, invokes them, and prints all of the results out (recursively). If an exception is encountered, I just catch it and print out the exception message, and continue on with the rest of the properties.
I just build the latest source from master and ran my program, and it seems that I'm no longer able to catch any of my PlatformNotSupported exceptions (wrapped in TargetInvocationException). The program just prints out the inner exception message/ stack trace, and terminates.
The program is here:
https://github.com/mellinoe/NetworkInformationApp/blob/master/src/NetworkInformation.SampleUsage/Program.cs
It's a bit long, but just take a look at, for example, the PrintProperties() method. I'm attempting to catch TargetInvocationException, and print out the inner exception, then just continue on. At runtime, though, I just get a message like:
Unhandled Exception: System.PlatformNotSupportedException: Operation is not . . .
at System.Net.NetworkInformation.....
at System.RuntimeMethodHandle.InvokeMethod(...)
...
Which should be the inner exception from my reflection invocation. I would expect that I can catch the TargetInvocationException and continue. This was working with a coreclr build from around last week.
I have a test program which I'm using to print out a bunch of information about some types that I am implementing. It basically enumerates all of the properties and methods on an object, invokes them, and prints all of the results out (recursively). If an exception is encountered, I just catch it and print out the exception message, and continue on with the rest of the properties.
I just build the latest source from master and ran my program, and it seems that I'm no longer able to catch any of my PlatformNotSupported exceptions (wrapped in TargetInvocationException). The program just prints out the inner exception message/ stack trace, and terminates.
The program is here:
https://github.com/mellinoe/NetworkInformationApp/blob/master/src/NetworkInformation.SampleUsage/Program.cs
It's a bit long, but just take a look at, for example, the PrintProperties() method. I'm attempting to catch TargetInvocationException, and print out the inner exception, then just continue on. At runtime, though, I just get a message like:
Which should be the inner exception from my reflection invocation. I would expect that I can catch the TargetInvocationException and continue. This was working with a coreclr build from around last week.