print error text
12393
function printError(error) {
    process.stderr.write(red);
    console.error(error.trace);
    process.stderr.write(yellow);
    console.error('an error occurred, please file an issue');
    process.stderr.write(reset);
    process.exit(1);
  }
689512
def error(message, *args, **kwargs):
    

    print('[!] ' + message.format(*args, **kwargs))
    sys.exit(1)
41860
def error(self, s, pos):
        
        print("Lexical error:")
        print("%s" % s[:pos+10])  # + 10 for trailing context
        print("%s^" % (" "*(pos-1)))
        for t in self.rv: print(t)
        raise SystemExit
1356044
def error(self, amplexception):
        
        msg = '\t'+str(amplexception).replace('\n', '\n\t')
        print('Error:\n{:s}'.format(msg))
        raise amplexception
611764
def format_error(module, error):
    """"""
    logging.error(module)
    # Beautify JSON error
    print error.message
    print json.dumps(error.error, sort_keys=True, indent=4, separators=(',', ': '))
    exit(1)
114407
def err(msg, level=-1, prefix=True):
    
    if will_print(level) or verbosity is None:
        printer(("ERROR: " if prefix else "") + msg, "red")
694854
def print_xmlsec_errors(filename, line, func, error_object, error_subject, reason, msg):
    

    info = []
    if error_object != "unknown":
        info.append("obj=" + error_object)
    if error_subject != "unknown":
        info.append("subject=" + error_subject)
    if msg.strip():
        info.append("msg=" + msg)
    if reason != 1:
        info.append("errno=%d" % reason)
    if info:
        print("%s:%d(%s)" % (filename, line, func), " ".join(info))
1240465
def print_row_failures(failing_items, verbose=False, outfile_name=None):
    
    if outfile_name:
        outfile = open(outfile_name, "w")
        outfile.write("\t".join(["name", "row_number", "problem_type",
                                 "problem_col", "error_message"]))
        outfile.write("\n")
    else:
        outfile = None
    for ind, row in failing_items.iterrows():
        issues = row['issues']
        string = "{:10}  |  row number: {}".format(ind, str(row["num"]))
        first_string = "\t".join([str(ind), str(row["num"])])
        if verbose:
            print(first_string)
        #if outfile:
        #    ofile.write("{}\n".format(string))
        for key, issue in list(issues.items()):
            issue_type, issue_col = extract_col_name(key)
            string = "{:10}  |  {:10}  |  {}".format(issue_type, issue_col, issue)
            string = "\t".join([issue_type, issue_col, issue])
            if verbose:
                print(string)
            if outfile:
                outfile.write(first_string + "\t" + string + "\n")
    if outfile:
        outfile.close()
475359
def pretty_print_error(err_json):
    """"""
    # Special case validation errors
    if len(err_json) == 1 and "validationOf" in err_json[0]:
        required_fields = ", ".join(err_json[0]["validationOf"]["required"])
        return "Validation error. Requires properties: {}.".format(required_fields)

    # General error handling
    msg = "; ".join(err.get("message", "") for err in err_json)

    # Fallback
    if not msg:
        msg = "Bad request."
    return msg
596072
def error(self, **kwargs):
        '''
        
        '''
        exception_header_width = 100

        e = Error(**kwargs)
        e.module = self.__class__.__name__

        self.errors.append(e)

        if e.exception:
            sys.stderr.write("\n" + e.module + " Exception: " + str(e.exception) + "\n")
            sys.stderr.write("-" * exception_header_width + "\n")
            traceback.print_exc(file=sys.stderr)
            sys.stderr.write("-" * exception_header_width + "\n\n")
        elif e.description:
            sys.stderr.write("\n" + e.module + " Error: " + e.description + "\n\n")
404529
def print_err(*args, **kwargs):
    
    sys.stderr.write(" ".join(str(arg) for arg in args) + "\n")
    if kwargs.get("flush", False):
        sys.stderr.flush()
975744
public static void printError(Class<?> c, String msg) {
		String preamble;
		if(c != null)
			preamble = "["+c.getSimpleName()+"]";
		else
			preamble = "";
		
		synchronized(System.err) {
			System.err.println(preamble+" "+msg);
		}
	}
693339
def _errmsg(self, error: "Err", tb: bool=False, i: int=None,
                msgformat: str="terminal") -> str:
        
        if msgformat == "terminal":
            msg = self._headline(error, i)
            if error.ex is not None:
                msg += "\n" + "line " + colors.bold(str(error.line))
                msg += ": " + colors.yellow(error.code)
                msg += "\n" + str(error.file)
                if self.errs_traceback is True or tb is True:
                    if error.tb is not None:
                        msg += "\n" + error.tb
        elif msgformat == "csv":
            sep = ","
            msg = error.msg + sep
            msg += str(error.line) + sep + error.code + sep
            msg += str(error.file)
        elif msgformat == "text":
            sep = ","
            msg = error.msg
            if error.ex is not None:
                msg += sep + str(error.line) + sep + error.code + sep
                msg += str(error.file) + sep         
                if self.errs_traceback is True or tb is True:
                    if error.tb is not None:
                        msg += sep + error.tb
        elif msgformat == "dict":
            msg = {"date": datetime.now()}
            if error.ex is not None:
                msg["msg"] = error.msg
                msg["line"] = error.line
                msg["code"] = error.code
                msg["file"] = error.file         
                if self.errs_traceback is True or tb is True:
                    if error.tb is not None:
                        msg["traceback"] = error.tb
        return msg
983421
def print_javascript_error(self):
        

        errors = self.get_javascript_error(return_type='list')
        if errors:
            self.info_log("Javascript error:")
            for error in errors:
                self.info_log(error)
1268896
def error(message, code=1):
    """"""
    if message:
        print('ERROR: {0}'.format(message), file=sys.stderr)
    else:
        print(file=sys.stderr)
    sys.exit(code)
82097
def error(self, msg):
        '''
        
        '''
        self.print_usage(sys.stderr)
        self.exit(salt.defaults.exitcodes.EX_USAGE, '{0}: error: {1}\n'.format(self.get_prog_name(), msg))
1193618
def print_err(self, *lst):
      
      self.print2file(self.stderr, False, True, *lst)