code: func (nc *Conn) LastError() error {
  	if nc == nil {
  		return ErrInvalidConnection
  	}
  	nc.mu.RLock()
  	err := nc.err
  	nc.mu.RUnlock()
  	return err
  }
docs: // LastError reports the last error encountered via the connection.
  // It can be used reliably within ClosedCB in order to find out reason
  // why connection was closed for example.