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

[orx-midi] provide an alternative for when a device is missing, better logging #312

Merged
merged 4 commits into from
May 26, 2023

Conversation

hamoid
Copy link
Member

@hamoid hamoid commented May 17, 2023

No description provided.

hamoid added 2 commits May 17, 2023 14:31
Different devices use different channels.
Some devices use multiple channels.
@@ -294,4 +295,39 @@ fun Program.openMidiDevice(name: String): MidiTransceiver {
val actualName = matchingDevice?.name ?: name

return MidiTransceiver.fromDeviceVendor(this, actualName)
Copy link
Member

Choose a reason for hiding this comment

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

Can openMidiDevice be implemented using return openMidiDevilceOrNull(name) ?: error("no MIDI device found for query '$name'") . This has the benefit of clearer error messages.

Copy link
Member Author

Choose a reason for hiding this comment

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

How does 6d2a4c5 look like?

Should all throws be error? Or leave them as they were?

@edwinRNDR edwinRNDR merged commit e5e8242 into openrndr:master May 26, 2023
hamoid added a commit to hamoid/orx that referenced this pull request May 29, 2023
@edwinRNDR edwinRNDR mentioned this pull request Jun 8, 2023
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