Fix a -Wdeprecated-declarations warning.#20
Conversation
This patch remove the declaration as the variable is unused.
|
Hi @kaworu and thanks for the patches. Are the exceptions correctly logged and handled despite removing this? Or are they handled in the first place? Could you check that out? |
|
@cheery my pleasure for the patches, thank you for this module! We are using it @NetOxygen on Raspberry Pi to detect some type of devices connected with great success. About this PR, I don't see any changes in behaviour (exceptions are not logged nor handled) before and after the patch. I also tried to replace it by a I feel I must be testing it incorrectly, here is an example script I used: var util = require("util");
var udev = require("./udev.js");
var monitor = udev.monitor();
monitor.on('add', function (device) {
console.log(device.DEVPATH + " added");
throw new Error("Trycatch?");
});Does this example looks like a good test case to you? If not, can you provide an example or hints? If yes, what is the expected behaviour? |
|
If the error doesn't appear like it appears in this case: Then we got a bug there. It's not a big thing but it ensures you get some message into the log if there's a problem. To be consistent, it may be good idea to check from some other library how they do this. It might even be a common usage pattern of Local that we are missing here. All right.. I merge this. |
This patch remove the declaration as the variable is unused.
Before this PR we get:
System info for the context: