1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

CoreMidi: Fetch detailed error information on supported platforms

This commit is contained in:
reuk 2025-07-24 12:44:18 +01:00
parent 883d3cdce3
commit 774819540e
No known key found for this signature in database

View file

@ -2233,11 +2233,19 @@ struct CoreMidiHelpers
[mutableBlocks.get() addObject: mutableBlock.get()];
NSError* error = nullptr;
// On macOS 15, passing a non-null NSError* will cause the function to fail.
// Hopefully we can get more detailed error information in future versions.
auto** errorParam = std::invoke ([&error]() -> NSError**
{
// On macOS 15, passing a non-null NSError* will cause the function to fail.
// This issue is fixed in macOS 26 beta 4.
if (@available (macOS 26, iOS 26, *))
return &error;
return nullptr;
});
const auto successAssigningBlocks = [endpoint registerFunctionBlocks: mutableBlocks.get()
markAsStatic: (areStatic == ump::BlocksAreStatic::yes)
error: nil];
error: errorParam];
if (! successAssigningBlocks)
{