******* Common functions ******** Sets the status butter, optionally indicating if it's an error message.
482863
function setButter(message, error) {
  var butter = getButterBar();
  // Prevent flicker on butter update by hiding it first.
  butter.hide();
  if (error) {
    butter.removeClass('info').addClass('error').text(message);
  } else {
    butter.removeClass('error').addClass('info').text(message);
  }
  butter.show();
  $(document).scrollTop(0);
}
934805
function createError (errorMessage, statusCode, statusMessage) {

	if (statusCode) {
		errorMessage = errorMessage + '\nHTTP[S] status: ' + statusCode;

		if (statusMessage) {
			errorMessage = errorMessage + ' ' + statusMessage;
		}
	}

	statusCode = statusCode || 0;
	statusMessage = statusMessage || 'Unspecified';

	let error = new Error(errorMessage);

	error.statusCode = statusCode;
	error.statusMessage = statusMessage;

	return error;
}
641999
private void setStatus(ConnectionStatus status){
        if(LOGGER.isDebugEnabled()){
            LOGGER.debug("Set status to - " + status);
        }
        if(! this.status.equals(status)){
            ConnectionStatus pre = this.status;
            this.status = status;
            eventThread.queueClientEvent(new ClientStatusEvent(pre, status));
        }
    }
1357964
function PlivoErrorStatus(status, response) {
  MessagingServiceStatus.call(this, 'plivo');
  
  // There was an error when attempting to send message
  this.state.message = status.toString() + ': ' + response.error;

  // See https://www.plivo.com/docs/api/response/ for details
  if (status == 400) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (status == 401) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else if (status == 404) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (status == 405) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (status == 500) this.state.code = this.StatusCodes.SERVICE_DOWN;
  else this.state.code = this.StatusCodes.DEFAULT;
}
532912
function (err, params) {
                if (!err) {
                  callback && callback(null, params);
                }
                else {
                  callback && callback(err.message || err);
                }
              }
1182950
def set_error_callback(cbfun):
    '''
    
    '''
    global _error_callback
    previous_callback = _error_callback
    if cbfun is None:
        cbfun = 0
    c_cbfun = _GLFWerrorfun(cbfun)
    _error_callback = (cbfun, c_cbfun)
    cbfun = c_cbfun
    _glfw.glfwSetErrorCallback(cbfun)
    if previous_callback is not None and previous_callback[0] != 0:
        return previous_callback[0]
92998
def set_error(self, msg, runSet=None):
        
        self.xml_header.set('error', msg if msg else 'unknown error')
        if runSet:
            runSet.xml.set('error', msg if msg else 'unknown error')
1263217
function ErrorSave (message) {

  Error.call(this);

  // Add Information
  this.name    = 'ErrorSave';
  this.type    = 'server';
  this.status  = 500;
  if (message) {
    this.message = message;
  }

}
1323087
def _reset_on_error(self, server, func, *args, **kwargs):
        
        try:
            return func(*args, **kwargs)
        except NetworkTimeout:
            # The socket has been closed. Don't reset the server.
            raise
        except ConnectionFailure:
            self.__reset_server(server.description.address)
            raise
1252845
function _setStatus(status, closeReason) {
        // Don't send a notification when the status didn't actually change
        if (status === exports.status) {
            return;
        }

        exports.status = status;

        var reason = status === STATUS_INACTIVE ? closeReason : null;
        exports.trigger("statusChange", status, reason);
    }
892377
function(data, errorMessages){
	this.reset();

	if(data) this.setData(data);

	if(errorMessages)
		this.setErrorMessages(errorMessages);
	else
		this.setErrorMessages(require('./errorMessages'));
}
562222
def SetStatus(self, status, message="", backtrace=None):
    """"""
    self.status.status = status
    self.status.error_message = utils.SmartUnicode(message)
    if backtrace:
      self.status.backtrace = utils.SmartUnicode(backtrace)
1372798
public void notifyStatusChanged(String status) {

    /* If the new status message is shorter than the previous one, then
     * first change the status message all spaces to clear out the previous
     * message.
     */
    if (status.length() < this.status.length()) {
      this.status = this.status.replaceAll(".", " ");
      this.printProgressBar();
    }

    this.status = status;
    this.printProgressBar();

  }
106591
function HttpError(message, status, cause) {
    this.status = status || StatusCode.UNKNOWN;
    HttpError.super_.call(this, errors.ErrorCode.HTTP + this.status, message || StatusLine[this.status] || StatusLine[StatusCode.UNKNOWN], cause);
}
1171483
function error(msg) {
    if (topWindow.console) {
      if (topWindow.console.error) {
        topWindow.console.error(msg);
      } else if (topWindow.console.log) {
        topWindow.console.log(msg);
      }
    }
  }
583041
function(err, status) {
					if (err) {
						callback(err);
						return;
					}

					if (status || status === 'OK') {
						report.inserted += _.isNumber(status) ? status : 1;
					} else {
						//	Hm...
						report.errors += 1;
					}

					AddRecursive();
				}
675952
function(err) {
            var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);
            $log.warn(msg);
            reject(err);
          }