andrewrk / mpd.js

Connect to a music player daemon server, send commands, emit events.
MIT License
89 stars 18 forks source link

errors and callbacks are done incorrectly #1

Closed andrewrk closed 12 years ago

andrewrk commented 12 years ago

moved from superjoe30/groovebasin#24

  1. In the mpd protocol, an error message is associated with a command. In our mpd class, errors are emitted as separate events. Callbacks for commands should have the error that came back, if any.
  2. The convention for callbacks is callback(error, result1, ..., resultN), where error can be null. We should follow this convention.