How best to test for room/stream failures in development

The official recommendation to handle the the various failure scenarios in
Licode seems to be:

  • listen for ‘stream-failed’ events for stream issues
  • listen for ‘room-disconnected’ and ‘room-error’ events for room issues
  • make sure room.subscribe(), room.unsubscribe(), room.publish(), and
    room.unpublish() use a callback with the signature function(result,
    error){} to look for possible errors in those operations.

My questions are:

  • What’s the difference between ‘room-disconnected’ and ‘room-error’?
  • Is there an equivalent function(result, error) {} signature that should
    be used for room.connect() and room.disconnect()?
  • For development purposes, what have you found to be the easiest way to
    simulate the various failure scenarios for the callbacks and for the
    ’stream-failed’, ‘room-error’, and ‘room-disconnected’ events?