Skip to content

Report the full .NET exception stack trace in fatal errors #386

Description

There are a couple places in JSThreadSafeFunction that call JSError.Fatal(ex.Message), where the exception message alone might not be enough information to diagnose the error.

As an example, a particular AOT trimming problem resulted in an error:

FATAL ERROR: DefaultCallJS at D:\a\1\s\src\NodeApi\Interop\JSThreadSafeFunction.cs:303
Constructor on type 'Microsoft.Extensions.Http.Resilience.Routing.Internal.RequestRoutingOptions' not found.

The full stack trace revealed that type instantiation was attempted by Activator.CreateInstance() which clearly indicates a trimming issue because the trimmer does not detect such dynamic instantiations.

Either the fatal error message should include the exception stack trace, or we should find a way to propagate the exception as a non-fatal JS error, where the .NET stack will be merged with the JS stack.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions