Closed 60-hz closed 2 months ago
It's a good question how we should handle errors in the data-flow environments. Think we need to develop the unified approach in the ceammc library.
If we suppose that errors are rare, it seems convenient to separate error processing from the main data-flow paths. Now the property @on_err added to the snd.play~, and it sends the error message to this address via the global Pd message dispatcher. You can receive it and handle with a [r NAME]
object.
But if we need more solid and reliable applications we should explicitly process errors, may be we should introduce a special error Atom type and special object to separate errors from main data-flow, like:
[object]
|
[err-> ]
| |
| [print ERR]
|
[data ok]
It's a subject to think
[snd.play~] should return something if a sound is not found when trying to load one. Having a an outlet notification would be nice.
Also adding the classic "open" method as most player objects do would be handy.