sindresorhus/electron-unhandled

Hide stack trace from logError

オープン

#31 opened on 2023/02/28

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (27 件のフォーク)user submission
enhancementhelp wanted

Repository metrics

Stars
 (464 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド