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

conditional catch statements no longer supported? #99

Closed
jikamens opened this issue Dec 17, 2017 · 4 comments
Closed

conditional catch statements no longer supported? #99

jikamens opened this issue Dec 17, 2017 · 4 comments
Assignees
Milestone

Comments

@jikamens
Copy link

Thunderbird daily is complaining:

JavaScript error: resource://dkim_verifier/dkimVerifier.jsm, line 608: SyntaxError: missing ) after catch

The issue appears to be a conditional catch statement at https://github.com/lieser/dkim_verifier/blob/master/modules/dkimVerifier.jsm#L608. Given that this is non-standard syntax and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch seems to discourage its use, perhaps, support for it has been removed?

@jikamens
Copy link
Author

It looks like there's another instance of this same syntax slightly later in the file that also needs to be fixed.

@lieser
Copy link
Owner

lieser commented Dec 18, 2017

fixed it.

But in 59.0a1 (2017-12-18) (32-bit) I still have the problem that it complains about missing default options, although https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57 states this was fixed in "Daily 59 as of 2017-12-12".

@lieser lieser closed this as completed Dec 18, 2017
@jikamens
Copy link
Author

I think that page is mistaken. I'm using the 2017-12-14 Thunderbird build and default preferences still aren't being loaded. Note that there is still a very active discussion in bug 1414398 about how to restore the functionality of loading default preferences.

If you wish, you may want to add code to your add-on to load your default preferences manually rather than relying on Thunderbird to do it. This is what I've ended up doing for all the add-ons I maintain. See e.g. jikamens/folder-pane-view-switcher@050ffbd. Feel free to steal my code (which I derived from code I stole (with attribution) from somebody else.

@lieser
Copy link
Owner

lieser commented Dec 18, 2017

Thanks a lot for letting me know about the workaround. Don't know if and when I will include it (hoping they are able to fix it on the Thunderbird side soon)

@lieser lieser added this to the 2.0.0 milestone Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants