microsoft / microsoft/node-api-dotnet

Report the full .NET exception stack trace in fatal errors

Aperta
#386 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@jasongin ci sta già lavorando.

Dal 10/10/2024.

threading
Lingua principale
C#
Stelle
783
Fork
80
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.