code: public synchronized boolean sendError(Throwable cause) {
  		if (cause == null) {
  			throw new IllegalArgumentException("Unable to send \"null\" as Exception!");
  		}
  		if (closed.compareAndSet(false, true)) {
  			this.cause = cause;
  			if (listeners != null) {
  				try {
  					if (listeners.length == 1) {
  						listeners[0].onPacket(null, cause, true);
  					} else {
  						for (PacketListener listener : listeners) {
  							listener.onPacket(null, cause, true);
  						}
  					}
  				} catch (MoleculerError moleculerError) {
  					throw moleculerError;
  				} catch (Throwable error) {
  					throw new MoleculerClientError("Unable to send error to stream listener!", error, nodeID, null);
  				}
  			}
  			return true;
  		}
  		return false;
  	}
docs: --- SEND ERROR ---