reason-tools
reason-tools copied to clipboard
all chrome.tabs.sendMessage errors ignored
In trying to fix a bug in reason-tools, I eventually found a page whitelist here:
https://github.com/reasonml/reason-tools/blob/07bf3b7ac4320bca2c325e9bc2c5d81fae28e5dd/src/extension/content/convert/detect.re#L57
So I whitelisted the local test HTML file I had created and then, because I had stopped checking the background window console, spent a long time scratching my head and double-checking assumptions. Finally, I guessed there might be a permissions issue, and sure enough, there was.
Can't whitelist local files: "Cannot access contents of page"
I realize that this whitelist is not an end-user feature, but it would be nice if this error didn't get swallowed nearly silently into the background window console.
So I took a look at where errors were being handled:
https://github.com/reasonml/reason-tools/blob/07bf3b7ac4320bca2c325e9bc2c5d81fae28e5dd/src/extension/common/message.re#L10
noop
certainly won't be handling any errors!
Any plans on improving this?
Thanks!