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

Add a function to toggle strict error handling for audio functions #7285

Closed
toby-yoyo opened this issue Aug 14, 2024 · 3 comments
Closed

Add a function to toggle strict error handling for audio functions #7285

toby-yoyo opened this issue Aug 14, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Milestone

Comments

@toby-yoyo
Copy link

toby-yoyo commented Aug 14, 2024

Is your feature request related to a problem?

In 2024.8 we had intended to begin throwing for certain types of audio errors, but this has turned out to be a high-impact change (see #7284).

Describe the solution you'd like

We should add an option to toggle stricter handling of audio errors via a new audio function. This will throw for:

  • Bad indices passed to functions (e.g. an asset that doesn't exist).
  • Bad values passed to functions (e.g. attempting to set an invalid falloff model, such as -1).
  • Bad operations (e.g. attempting to record using an already active input device).

Describe alternatives you've considered

No response

Additional context

No response

@jackerley
Copy link

I think the default should be for stricter handling of errors

@toby-yoyo
Copy link
Author

toby-yoyo commented Sep 16, 2024

Added the function audio_throw_on_error, which should toggle throwing behaviour for the error types in the description. The default behaviour will be to throw for these error types, and this can be suppressed by passing false to the function. It can also be reenabled by passing in true.

Note that 'bad sound instance' is a separate error type from a 'bad index', and will not be thrown for until we can make certain guarantees about their behaviour in the engine. Any error types not thrown for (including those suppressed by the new function) will have their error messages printed to the console.

Example project: gmb-7285-x.zip

@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Workload Sep 16, 2024
@YYBartT YYBartT added the documentation Improvements or additions to documentation are required by this issue label Sep 16, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo self-assigned this Sep 17, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo moved this from Done to Ready for QA in Team Workload Sep 17, 2024
@alicemoretti
Copy link
Contributor

Verified fixed on IDE v2024.1100.0.626 Runtime v2024.1100.0.652.

Thank you.

@alicemoretti alicemoretti moved this from Ready for QA to Verified in Team Workload Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Projects
Status: Verified
Development

No branches or pull requests

6 participants