Browse Source

send error message to stderr, not to stdout

pre-master-46
Holger Vogt 4 years ago
parent
commit
ffc09208bf
  1. 2
      src/ciderlib/oned/onemesh.c
  2. 15
      src/frontend/com_measure2.c

2
src/ciderlib/oned/onemesh.c

@ -72,7 +72,7 @@ ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain,
for (index = 2; index < pDevice->numNodes; index++) { for (index = 2; index < pDevice->numNodes; index++) {
pNode = nodeArray[index]; pNode = nodeArray[index];
if (!pNode->nodeType) { if (!pNode->nodeType) {
printf("Error: No domain defined for node %d\n", pNode->nodeI);
fprintf(stderr, "Error: No domain defined for node %d\n", pNode->nodeI);
error = TRUE; error = TRUE;
} }
} }

15
src/frontend/com_measure2.c

@ -77,9 +77,8 @@ static void measure_errMessage(const char *mName, const char *mFunction,
const char *trigTarg, const char *errMsg, int chk_only) const char *trigTarg, const char *errMsg, int chk_only)
{ {
if (!chk_only) { if (!chk_only) {
printf("\nError: measure %s %s(%s) : ", mName, mFunction, trigTarg);
printf("%s", errMsg);
// printf("\tmeasure '%s' failed\n", mName);
fprintf(stderr, "\nError: measure %s %s(%s) : ", mName, mFunction, trigTarg);
fprintf(stderr, "%s", errMsg);
} }
} }
@ -1614,9 +1613,9 @@ get_measure2(
} }
if (wl_cnt < 3) { if (wl_cnt < 3) {
printf("\tmeasure '%s' failed\n", mName);
printf("Error: measure %s :\n", mName);
printf("\tinvalid num params\n");
fprintf(stderr, "\tmeasure '%s' failed\n", mName);
fprintf(stderr, "Error: measure %s :\n", mName);
fprintf(stderr, "\tinvalid num params\n");
tfree(mName); tfree(mName);
tfree(mAnalysis); tfree(mAnalysis);
tfree(mFunction); tfree(mFunction);
@ -2041,8 +2040,8 @@ err_ret7:
case AT_ERR2: case AT_ERR2:
case AT_ERR3: case AT_ERR3:
{ {
printf("\nError: measure %s failed:\n", mName);
printf("\tfunction '%s' currently not supported\n\n", mFunction);
fprintf(stderr, "\nError: measure %s failed:\n", mName);
fprintf(stderr, "\tfunction '%s' currently not supported\n\n", mFunction);
tfree(mFunction); tfree(mFunction);
break; break;
} }

Loading…
Cancel
Save