Skip to content

Expose System.Reflection.TargetException #15689

@jonorossi

Description

@jonorossi

.NET Framework exposed both TargetException (fail on an invalid target, e.g, null) and TargetInvocationException (fail actually invoking the target). The runtime still throws a TargetException in coreclr and there is code in the corefx unit tests that check the exception is thrown using Type.FullName or Assert.ThrowsAny<Exception>.

Is there a reason this exception hasn't been exposed? I'm porting code checking for this exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.Reflection

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions