alsa-project/alsa-gobject pull request #52 was opened from takaswie:
The patchset is the part of work about #47.
Current implementation uses library-wide error domain to report error. this is partly against rule of GError usage. Furthermore, the error delivers information just about errno and hard to know the cause of error.
This patchset enhances error reporting. The library-wide error domain is obsoleted. A new error domain is added just for ALSARawmidi.StreamPair. The error domain delivers information about the cause of error
``` Takashi Sakamoto (15): timer: user_instance: fix code for GFileError seq: user_client: fix code for GFileError rawmidi: skip check of return value from g_malloc() rawmidi: check whether method argument for GError is available rawmidi: add checks for method arguments rawmidi: stream_pair: just return when character device is not opened rawmidi: query: simplify count check rawmidi: add GLib enumerations for error reporting rawmidi: stream-pair: add GQuark to report error for ALSARawmidi.StreamPair rawmidi: report error for ioctl rawmidi: report open/read/write/fcntl error rawmidi: report error for card disconnection state rawmidi: stream_pair: report error about write-only file descriptor rawmidi: query: use GFileError to report error rawmidi: obsolete library-wide GQuark for error reporting
src/rawmidi/alsarawmidi-enum-types.h | 14 +++ src/rawmidi/alsarawmidi.map | 5 + src/rawmidi/privates.h | 6 - src/rawmidi/query.c | 117 ++++++++---------- src/rawmidi/stream-pair.c | 172 +++++++++++++++++++++------ src/rawmidi/stream-pair.h | 4 + src/seq/user-client.c | 6 +- src/timer/user-instance.c | 2 +- tests/alsarawmidi-enums | 6 + 9 files changed, 216 insertions(+), 116 deletions(-) ```
Request URL : https://github.com/alsa-project/alsa-gobject/pull/52 Patch URL : https://github.com/alsa-project/alsa-gobject/pull/52.patch Repository URL: https://github.com/alsa-project/alsa-gobject