On 6/14/21 3:33 PM, Christof Ressi wrote:
Here's another idea, which I don't really love, but which I would prefer over your proposed [canvaserror]:
Method calls which can generate an error send the error code to a global [errno] object and the user can query the current error state with a bang. This would be similar to 'errno' in C.
but which error-code? i mean, there currently is no such thing and if you want to use it you have to hope for the object author to implement it.
the nice thing about the [patcherror] object is that no changes would be required to whatever objects (apart from the patch that uses it, obviously; but that's true for all solutions).
i also like the possibility, to suppress error printout (e.g. when opening an *optional* configuration file).
and: it would allow us to catch *multiple* errors (e.g. if an object emitted two errors in a row, without stopping to send something to the outlet so we can query the errno). as well as being able to catch errors that are not triggered by a message directly (think: delayed opening of a file; either because this happens only when dsp is turned on, or even in a separate thread).
gamdrs IOhannes