mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-30 16:10:08 -04:00
Differentiate peripheral errors: request vs. disconnect (#1654)
* Beginning to add differentiation for hardware disconnect alerts. * Set connected status after error is sent.
This commit is contained in:
parent
899ce56214
commit
2564b24d71
4 changed files with 60 additions and 25 deletions
src/engine
|
@ -457,11 +457,19 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Event name for reporting that a peripheral has encountered an error.
|
||||
* Event name for reporting that a peripheral has encountered a request error.
|
||||
* @const {string}
|
||||
*/
|
||||
static get PERIPHERAL_ERROR () {
|
||||
return 'PERIPHERAL_ERROR';
|
||||
static get PERIPHERAL_REQUEST_ERROR () {
|
||||
return 'PERIPHERAL_REQUEST_ERROR';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name for reporting that a peripheral has encountered a disconnect error.
|
||||
* @const {string}
|
||||
*/
|
||||
static get PERIPHERAL_DISCONNECT_ERROR () {
|
||||
return 'PERIPHERAL_DISCONNECT_ERROR';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue