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

Improve error handling when loading samples #272

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

ahihi
Copy link
Contributor

@ahihi ahihi commented Jun 22, 2022

adds a missing return and corrects a try call. fixes #266

Copy link
Contributor

@telephon telephon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! just one little thing …

var buf = this.readSoundFile(filepath);
if(buf.notNil) {
this.addBuffer(name, buf, appendToExisting);
appendToExisting = true; // append all others
};
} { |erreur|
if(erreur.isException) { erreur.reportError };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, if we use the handler, no need to ask again if it is an exception, because the handler is only called if it is an exception. So this would be fine:

{ |erreur| erreur.reportError };

@ahihi
Copy link
Contributor Author

ahihi commented Jun 26, 2022

good point, fixed!

@telephon telephon merged commit abea28e into musikinformatik:develop Jun 27, 2022
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.

startup code works with 1.7.2, fails with 1.7.3
2 participants