sindresorhus/electron-unhandled

Hide stack trace from logError

Ouverte

#31 ouverte le 28 févr. 2023

 (1 commentaire) (0 réaction) (0 personne assignée)JavaScript (27 forks)user submission
enhancementhelp wanted

Métriques du dépôt

Stars
 (464 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur