Called when a chunk fires a 'loadcomplete' event.

@param {Error} err
@param {Chunk} chunk
429373
function(err, chunk)
  {
    // unsubscribe from the 'loadcomplete' event
    chunk.removeListener('loadcomplete', onLoadComplete);

    // if the chunk load succeeded
    if (!err)
    {
      // move on to the next chunk
      start++;

      // emit an event to signal that new data is available
      self.emit('data', chunk);
    }
    else
    {
      // close the stream with an error; also, include a callback when emitting
      // the event in case someone wants to fix the problem and ask us to
      // continue from where we got interrupted
      close(self, err, doLoad);
    }
  }
147265
def on_complete(cls, req):
        
        # handle http errors
        if not (req.status == 200 or req.status == 0):
            ViewController.log_view.add(req.text)
            alert(req.text)  # TODO: better handling
            return

        try:
            resp = json.loads(req.text)
        except ValueError:
            resp = None

        if not resp:
            alert("Chyba při konverzi!")  # TODO: better
            ViewController.log_view.add(
                "Error while generating MARC: %s" % resp.text
            )
            return

        OutputPicker.show(resp)
262247
function onClientError(err) {
    // Ignore ECONNRESET errors
    if ((err || {}).errno !== 'ECONNRESET') {
      log.error('An unhandled error occured when searching for the root DSE at "%s". Error: %j', url, err);
      if (hasEvents.call(self, 'error')) self.emit('error', err)
    }
  }
1235277
function(err)
  {
    // if we have a result stream, stop listening to events on it
    if (resultStream)
    {
      resultStream.removeListener('data', onResultStreamData);
      resultStream.removeListener('close', onResultStreamClose);
    }

    // we're done, so time to clean up
    rowBuffer = null;
    rowIndex = 0;
    resultStream = null;
    numResultStreamInterrupts = 0;

    if (err)
    {
      emitError(err);
    }
    else
    {
      self.push(null);
    }
  }
1106627
function load(err, data){
            if (err) throw err
            _.log('view added: '+name+': '+source)
            views[name] = compile(''+data)
        }
712763
private void parseQueryError(boolean lastChunk) {
        while (true) {
            int openBracketPos = findNextChar(responseContent, '{');
            if (isEmptySection(openBracketPos) || (lastChunk && openBracketPos < 0)) {
                sectionDone();
                queryParsingState = transitionToNextToken(lastChunk); //warnings or status
                break;
            }

            int closeBracketPos = findSectionClosingPosition(responseContent, '{', '}');
            if (closeBracketPos == -1) {
                break;
            }

            int length = closeBracketPos - openBracketPos - responseContent.readerIndex() + 1;
            responseContent.skipBytes(openBracketPos);
            ByteBuf resultSlice = responseContent.readSlice(length);
            queryErrorObservable.onNext(resultSlice.copy());
        }
    }
494097
function onOutError(err) {
    errNodecat = combineErrors(errNodecat, err);
    errStream.write(`nodecat: ${err}\n`);
    if (inCleanup) {
      inCleanup();
    }
    allDone();
  }
705740
function(err) {
		/**
		 * If err is an Error object, break the chain and call catch
		 */
		if (err && (err.constructor.name === "Error" || err.constructor.name === "TypeError") && this.onCatch) {
			this.onCatch(err);
			return;
		}

		var nextFn = this.fnStack.shift();
		if (nextFn) {
			/**
			 * Ensure arguments are passed as an Array
			 */
			var args = Array.prototype.slice.call(arguments);
			return this.execute(nextFn.fn, args);
		}
	}
220746
function(err,results) {
                            var _stdout = fs.createReadStream(results[1]);
                            var _stderr = fs.createReadStream(results[0]);
                            jobObj.emit("completed", _stdout, _stderr, jobObj);
                        }
114543
@SubscribeEvent
	public void onDataLoad(ChunkDataEvent.Load event)
	{
		if (event.getData().hasKey("chunkNotifier"))
			chunks(event.getChunk()).addAll(event.getChunk(), readLongArray(event.getData()));
	}
27013
public void onUploadTaskError(long rid) {
        if (LOG) {
            Log.d(TAG, "Upload #" + rid + " error");
        }
        QueueItem queueItem = findItem(rid);
        if (queueItem == null) {
            if (LOG) {
                Log.d(TAG, "- Nothing found");
            }
            return;
        }

        if (!queueItem.isStarted) {
            return;
        }

        queueItem.taskRef.send(PoisonPill.INSTANCE);
        queueItem.isStopped = true;
        queueItem.isStarted = false;

        ArrayList<UploadFileCallback> clist = callbacks.get(rid);
        if (clist != null) {
            for (final UploadFileCallback callback : clist) {
                im.actor.runtime.Runtime.dispatch(() -> callback.onNotUploading());
            }
        }

        queueItem.requestActor.send(new UploadError(rid));

        checkQueue();
    }
1025363
function load(root, path, callback, errback) {
		resolve(root, path, function (realPath, contents) {
			process(realPath, contents, callback, errback);
		}, errback);
	}
26251
function(id, chunkIdx, response, xhr) {
            var chunkData = handler._getChunkData(id, chunkIdx);

            handler._getFileState(id).attemptingResume = false;

            delete handler._getFileState(id).temp.chunkProgress[chunkIdx];
            handler._getFileState(id).loaded += chunkData.size;

            options.onUploadChunkSuccess(id, handler._getChunkDataForCallback(chunkData), response, xhr);
        }
1176015
function finish(err) {
      // Run callbacks when we have an error,
      // or when import parsing is complete.
      if (err || self.isParsed()) {
        // Cache the file after parsing:
        _.cacheFile(self);

        // Run all callbacks:
        for (var i=0; i < self._cb.length; i++) self._cb[i](err, self);
        self._cb = [];
      }
    }
257544
function errHandler(err) {
    /* istanbul ignore else */
    if (_output) {
      err = err instanceof Error ? err : new Error(err)
      _emitter.emit('end', err)
      _output = null
    }
    else
      console.error('jspreproc: ' + err)
  }
89503
function onFailure(err) {
          _removeDOMElement(placeholder);
          if (console && console.debug) {
            console.debug('The following error occured: ', err);
          }

          /* Call custom callback */
          if ($scope.onError) {
            $scope.onError({err:err});
          }

          return;
        }
233156
function( required, startFunc ) {
		if ( required !== render.state ) {
			render._stateError( startFunc || render.requireState );
		}
	}