sindresorhus/electron-unhandled

Hide stack trace from logError

Offen

#31 geöffnet am 28.02.2023

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (27 Forks)user submission
enhancementhelp wanted

Repository-Metriken

Stars
 (464 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi, I am using the following code in order to customize the error message shown to the user when a http request fails.

req.on('error', () => {
                const error = new Error('Custom error message.');
                error.stack = null;
                unhandled.logError(error, {
                    title: 'Custom error title'
                });
            });

However, the error popup also shows a stack trace at the end of my message, that I would like to hide, is there any way I can achieve this? image

Contributor Guide