chris-zen / coremidi

CoreMIDI library for Rust
https://chris-zen.github.io/coremidi/coremidi/
MIT License
75 stars 20 forks source link

Improve error types #56

Open BenLeadbetter opened 3 months ago

BenLeadbetter commented 3 months ago

Improve error types

Most Result return values use an i32 (an OSStatus) as their error variant. This is not ideal for a couple of reasons

BenLeadbetter commented 3 months ago

I would propose a solution where we create a dedicated coremidi::Error type, which has a method to retrieve the OS status code value.

This would likely be a "breaking change", but perhaps this isn't so bad if the crate is still in the 0.*.* phase.