- if (printCommands)
- fflush(stdout);
- if (pos >= 0)
- fprintf(errFile, "Error (%d): ", pos);
- else
- fprintf(errFile, "Error: ");
+ // NB: this can be called before the globalParams object is created
+ if (globalParams && globalParams->getErrQuiet()) {
+ return;
+ }
+ if (pos >= 0) {
+ fprintf(stderr, "Error (%d): ", pos);
+ } else {
+ fprintf(stderr, "Error: ");
+ }