Hi Roger,

I'm facing a frustrating issue related to portmidi error reporting. It
seems that there are two alternatives:

1. print an error message to stdio and abort program execution, or
2. return an error code.

In my app I would like to use the second option (handle all errors, so I
would expect portmidi returning an error code/message) but the issue is
that this is not a portmidi runtime option but a portmidi build time
option, controlled by macro PM_CHECK_ERRORS. Therefore, *all* applications
are forced to use the reporting option chosen by sysadmins (or by distro
package builders, Linux Mint in may case).

Moreover I can not distribute an application behaving consistently from one
machine to another as a portmidi error (i.e. buffer overflow) would
generate a crash in some machines but in others the app. will be able to
handle the error, depending on the installed portmidi library.

Probably I'm missing something but, if not, I would suggest to change the
code to facilitate applications to choose the desired behaviour instead of
being something determined by sysadmins when installing the portmidi
library or by the distro portmidi package. Perhaps to have a run time
option for setting the error reporting behaviour or to throw an exception
instead of the 'exit(-1);' instruction, so that an application can opt for
catching the exception or ignoring it and crashing. Could this be feasible?

Thank you very much,
Cecilio Salmeron
_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to