Skip to content
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

Feat - error handling #66

Merged
merged 11 commits into from
Jan 4, 2024
Merged

Feat - error handling #66

merged 11 commits into from
Jan 4, 2024

Conversation

b-ma
Copy link
Collaborator

@b-ma b-ma commented Jan 3, 2024

Quite a massive one again,

Still need to

  • Handle simple errors that may occur here and there and that comes from the bindings, e.g.
[lib/errors.js] Unhandled error type Error undefined value for ChannelInterpretation
  | X new WaveShaperNode(c, {channelInterpretation: "foobar"}) threw "Error" instead of EcmaScript error TypeError.
  • Wrap the AudioParam interface
  • Wrap the AudioBuffer interface, but will do that later, not sure how to handle this case right now

Results so far:

  RESULTS:
  - # pass: 3740 (+135)
  - # fail: 1281 (-3)
  - # type error issues: 109 (-125)

@b-ma
Copy link
Collaborator Author

b-ma commented Jan 4, 2024

RESULTS:
  - # pass: 3863 (+123)
  - # fail: 1208 (-73)
  - # type error issues: 59 (-50)

With:

@b-ma b-ma merged commit 2756093 into main Jan 4, 2024
5 checks passed
@b-ma b-ma deleted the feat/error-handling branch January 4, 2024 20:21
@b-ma
Copy link
Collaborator Author

b-ma commented Jan 4, 2024

Ok let's merge, that's already a lot of stuff (and improvements)

@orottier
Copy link
Collaborator

orottier commented Jan 5, 2024

Hey yeah sorry, I had not taken the time yet to look into this.
Do you want me to rewrite all user facing panics as <JSErrorName> - <ErrorMessage> ? Some of them still use : as separator

@b-ma
Copy link
Collaborator Author

b-ma commented Jan 5, 2024

No problem, the diff is mostly unreadable anyway :)

In short, we now have JS facades for almost every nodes / classes (still need to handle AudioBuffer and PeriodicWave I guess) which are mostly there to catch native errors and re-trigger them with the right error type.

Do you want me to rewrite all user facing panics as - ? Some of them still use : as separator

Yup that would be nice indeed! Thanks

Also made some update this morning to use the new async resume, suspend, close methods, seems to work like a charm!

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.

2 participants