Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Move serial errors to console
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
khanning committed Sep 13, 2016
1 parent a74d56a commit ed239eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scratch_extensions/scratch_ext.js
Expand Up @@ -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);
Expand Down

0 comments on commit ed239eb

Please sign in to comment.