Skip to content

Improve error handling #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Improve error handling #54

wants to merge 1 commit into from

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