Пример #1
0
func (this *HttpResponse) SendError(err query.Error) {
	switch err.Level() {
	case query.EXCEPTION:
		this.err = err
	case query.WARNING:
		this.warnings = append(this.warnings, err)
	case query.INFO:
		this.info = append(this.info, err)
	}

	if err.IsFatal() {
		close(this.results)
	}
}
Пример #2
0
func (this *FastCount) SendError(err query.Error) bool {
	ok := true
	for ok {
		select {
		case this.supportChannel <- err:
			if err.IsFatal() {
				return false
			}
			return true
		case _, ok = <-this.downstreamStopChannel:
			// someone closed the stop channel
		}
	}
	return false
}
Пример #3
0
func (this *MockResponse) SendError(err query.Error) {
	this.err = err
	if err.IsFatal() {
		close(this.done)
	}
}