Skip to content

Conversation

b-ma
Copy link
Collaborator

@b-ma b-ma commented Dec 22, 2023

Some promising tests regarding #8

@b-ma
Copy link
Collaborator Author

b-ma commented Jan 2, 2024

Hum does not work as expected with method, fall into "illegal invocation" trap... cf. https://mtsknn.fi/blog/illegal-invocations-in-js/

Will need to generate the API on JS side to try / catch native method invocations, e.g.

class AudioBufferSourceNode {
  // ...
  start(when) {
    try {
      super.start(when);
    } catch (err) {
      throwSanitizedError(err);
    }
  }
}

Some new tests there: https://github.com/ircam-ismm/node-web-audio-api/tree/feat/error-handling

@b-ma b-ma closed this Jan 2, 2024
@b-ma b-ma deleted the fix/error-handling branch January 2, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant