Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion with sample code] Add an option to hide error message box #58

Open
samuelcarreira opened this issue May 22, 2018 · 4 comments

Comments

@samuelcarreira
Copy link

samuelcarreira commented May 22, 2018

@sindresorhus please add an option to display the error message box.
If make more sense allow users to deal with the download errors. I quickly created some code, so you can copy/paste the text without loosing to much time.

LINE 55 ADD:

const showErrorDialog = options.showErrorDialog != null ? options.showErrorDialog : true; // default is true

LINE 108 CHANGE TO:

if (showErrorDialog) {
   electron.dialog.showErrorBox(errorTitle, message);
}

README.md ADD

#### showErrorDialog

Type: `boolean`<br>
Default: `true`

Show error dialog

Thank you for your good work on many modules

@pirog
Copy link

pirog commented May 23, 2018

👍 would also love to see this. we've got a consistent and unified error handling mechanism and it would be great to suppress the alert and send the error to this mechanism.

@nimrod-cohen
Copy link

+1

@samuelcarreira
Copy link
Author

@nimrod-cohen because I didn't have response from @sindresorhus I've forked this project a few months ago with these changes.
You can use it if you want:

"dependencies": {
        "electron-dl": "github:samuelcarreira/electron-dl"
          (...)

link to project: https://github.com/samuelcarreira/electron-dl

@nimrod-cohen
Copy link

@samuelcarreira very nice, many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants