/** * qerror_print(): Print QError data * * This function will print the member 'desc' of the specified QError object, * it uses error_report() for this, so that the output is routed to the right * place (ie. stderr or Monitor's device). */ void qerror_print(QError *qerror) { QString *qstring = qerror_human(qerror); loc_push_restore(&qerror->loc); error_report("%s", qstring_get_str(qstring)); loc_pop(&qerror->loc); QDECREF(qstring); }
/* * Initialize *LOC to "nowhere", push it onto the location stack. * The top of that stack is the current location. * Needs a matching loc_pop(). * Return LOC. */ Location *loc_push_none(Location *loc) { loc->kind = LOC_NONE; loc->prev = NULL; return loc_push_restore(loc); }