FUNCTION: onAnagrams( error, hashes )
Callback invoked after finding anagrams within the specified Wikipedia resources.

@param {Object|null} error - error object
@param {Object[]} hashes - array of anagram hashes
351724
function onAnagrams( error, hashes ) {
	var hash,
		len,
		i;
	if ( error ) {
		throw new Error( error );
	}
	// Print the individual results...
	len = hashes.length;
	for ( i = 0; i < len; i++ ) {
		console.log( resources[ i ] + '...' );
		console.log( hashes[ i ].get() );
		console.log( '\n' );
	}
	// Merge the hashes...
	hash = hashes[ 0 ].copy();
	hash.merge.apply( hash, hashes.slice( 1 ) );

	// Print the merged hash...
	console.log( 'Merged...' );
	console.log( hash.get() );
}
1181557
function Error() {
  Illuminati.apply(this, arguments);

  var backtrace = new Backtrace({ error: this })
    , sourcemap = stackmap(Error.sourcemap).map(backtrace.traces);

  this.stringify(backtrace.traces, sourcemap);
}
216159
function(error) {
  if (error instanceof Error) return error;

  var msg = error.err || error.errmsg || error.errMessage || error;
  var e = MongoError.create({ message: msg, driver: true });

  // Get all object keys
  var keys = typeof error === 'object' ? Object.keys(error) : [];

  for (var i = 0; i < keys.length; i++) {
    try {
      e[keys[i]] = error[keys[i]];
    } catch (err) {
      // continue
    }
  }

  return e;
}
1130716
function callback(err, callbackId) {
    // There is a single callback for all load events, so make sure this
    // is the right one.
    if (callbackId !== imageId) {
      return;
    }

    stage.removeFlashCallbackListener('imageLoaded', callback);

    // TODO: is there any way to distinguish a network error from other
    // kinds of errors? For now we always return NetworkError since this
    // prevents images to be retried continuously while we are offline.
    if (err) {
      done(new NetworkError('Network error: ' + url));
    } else {
      done(null, new FlashAsset(flashElement, imageId));
    }
  }
1171323
def local_on_error(err)

      if h.on_error.is_a?(String) or Ruote.is_tree?(h.on_error)

        return h.on_error
      end

      if h.on_error.is_a?(Array)

        # all for the 'on_error' expression
        # see test/functional/eft_38_

        h.on_error.each do |oe|

          if (he = HandlerEntry.new(oe)).match(err)
            return he.narrow
          end
        end
      end

      nil
    end
850238
@JsonIgnore
	public boolean isErrorCode(String... codes) {
		for (String err : codes)
			if (errorCode.equals(err))
				return true;
		return false;
	}
1098966
function on_error(e) {
	console.log('problem with request: ' + e.message);
	var response = new anchor._response_handler(null);
	response.okay(false);
	response.message(e.message);
	response.message_type('error');
	anchor.apply_callbacks('error', [response, anchor]);
    }
135492
function multipleErrors(errors) {
  var messages = errors.map(function(e) { return e.message; });
  return createError(
      ['Errors:'].concat(messages).join('\n- '),
      errors[0].interval);
}
532912
function (err, params) {
                if (!err) {
                  callback && callback(null, params);
                }
                else {
                  callback && callback(err.message || err);
                }
              }
1262439
function errmsg(msg) {
  const obj = this._obj,
        errorMessages = getErrorMessages(obj);
  this.assert(
    _.includes(errorMessages, msg),
    'expected #{this} to have an error message: #{errmsg}',
    'expected #{this} to not an error message: #{errmsg}',
    msg,   // expected
    errorMessages   // actual
  );
}
994058
function onResError (ctx, err) {
  // nothing we can do here other
  // than delegate to the app-level
  // handler and log.
  if (ctx.headerSent || ctx._finished != null) {
    err.headerSent = ctx.headerSent
    err.context = ctx.toJSON()
    return err
  }

  // unset headers
  if (isFn(ctx.res.getHeaderNames)) {
    for (let name of ctx.res.getHeaderNames()) {
      if (!ON_ERROR_HEADER_REG.test(name)) ctx.res.removeHeader(name)
    }
  } else { // Node < 7.7
    let _headers = ctx.res._headers
    if (_headers) {
      // retain headers on error
      for (let name of Object.keys(_headers)) {
        if (!ON_ERROR_HEADER_REG.test(name)) delete _headers[name]
      }
    }
  }
  // support ENOENT to 404, default to 500
  if (err.code === 'ENOENT') ctx.status = 404
  else if (typeof err.status !== 'number' || !statuses[err.status]) ctx.status = 500
  else ctx.status = err.status

  ctx.set('x-content-type-options', 'nosniff')
  // support JSON error object: { error: 'BadRequest', message: 'Some bad request' }
  ctx.body = !isError(err) ? err : {
    error: err.error || err.name,
    message: err.expose ? err.message : statuses[ctx.status]
  }
  respond.call(ctx)
  return err
}
340203
function anagrams(str) {
  if (str.length <= 2) return str.length === 2 ? [str, str[1] + str[0]] : [str];

  return str.split('').reduce((acc, letter, i) =>
    acc.concat(anagrams(str.slice(0, i) + str.slice(i + 1)).map((val) => letter + val)), []);
}
533560
function(errOrMessage, result) {
        var err = (errOrMessage instanceof Error) ? errOrMessage : new Error(errOrMessage);
        result = result || {};
        result.error = err;
        result.status = 'error';
        err.result = result;
        return err;
    }
1270647
function parseError(error: Error | string | string[]): StackFrame[] {
  if (error == null) {
    throw new Error('You cannot pass a null object.')
  }
  if (typeof error === 'string') {
    return parseStack(error.split('\n'))
  }
  if (Array.isArray(error)) {
    return parseStack(error)
  }
  if (typeof error.stack === 'string') {
    return parseStack(error.stack.split('\n'))
  }
  throw new Error('The error you provided does not contain a stack trace.')
}
469848
function SpotifyError (err) {
  this.domain = err[0] || 0;
  this.code = err[1] || 0;
  this.description = err[2] || '';
  this.data = err[3] || null;

  // Error impl
  this.name = domains[this.domain];
  var msg = codes[this.code];
  if (this.description) msg += ' (' + this.description + ')';
  this.message = msg;
  Error.captureStackTrace(this, SpotifyError);
}
1367256
def on_error(self, headers, body):
        
        if log.isEnabledFor(logging.DEBUG):
            log.debug("received an error %s [%s]", body, headers)
        else:
            log.info("received an error %s", body)
        self.errors += 1
725979
function (errors) {
    if (typeof errors === 'string' || errors instanceof Error) {
      errors = {'*': '' + errors};
    }
    else if (errors == null) {
      errors = {'*': 'Unknown error'};
    }
    return new DS.InvalidError(errors);
  }