Move serial errors to console

When a serial device is disconnected the user receives two
dialog messages indicating there was a serial device error.
This can cause confusion since the error message does not
clearly indicate what has happened.

Instead of alerting the user this will push the message to the console.
This commit is contained in:
Kreg Hanning 2016-09-13 14:30:35 -04:00
parent a74d56abd6
commit ed239eb0f0

View file

@ -359,7 +359,7 @@ window.ScratchExtensions = new (function () {
if (dev) {
devices[ext_name] = self;
dev.set_error_handler(function (message) {
alert('Serial device error\n\nDevice: ' + id + '\nError: ' + message);
console.log('Serial device error\nDevice: ' + id + '\nError: ' + message);
});
}
if (readyCallback) readyCallback(d ? self : null);