Skip to content

Option to no longer suppress TargetInvocationException in AsmBrowser #108

Closed
@maettu-this

Description

@maettu-this

As discussed by mail:

Matthias:

Note that the exception actually is a TargetInvocationException. But for some reason, AsmBrowser.Invoke() (implemented in AsmHelper.cs ~line 1507ff) suppresses this TargetInvocationException and only re-throws the inner TypeLoadException.

Oleg:

As for the second problem "re-throwing an inner exception" it is a deliberate choice. The first exception is a Remoting transport container and it never reflect the nature of the runtime error (thrown by the script). However if it creates problems with troubleshooting then please log a feature request to make it optional.

Rationale for this change request:
Only the original TargetInvocationException contains the stack frame (i.e. code location) where the problem occurs the first time. This piece of information can be very helpful in debugging such issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions