code: function safeSend(ws, obj){
  	try{
  		ws.send(wrap(obj));
  	} catch(e){
  		log("An error occurred while sending a WebSocket datagram. Check the console (F12) for the stack trace.");
  		console.log(e);
  	}
  }
docs: Convenience functions