sindresorhus/electron-unhandled

Hide stack trace from logError

Open

#31 建立於 2023年2月28日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (464 star) (27 fork)user submission
enhancementhelp wanted

描述

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

貢獻者指南