Return 0 from main.c if run has warnings

This commit is contained in:
Lew Rossman
2018-12-07 09:46:15 -05:00
parent fa80bec8bb
commit e2ee4564a8

View File

@@ -77,15 +77,17 @@ int main(int argc, char *argv[])
if (errcode == 0) if (errcode == 0)
{ {
printf("\n... EPANET ran successfully.\n"); printf("\n... EPANET ran successfully.\n");
return 0;
} }
else if (errcode < 100) else if (errcode < 100)
{ {
printf("\n... EPANET ran with warnings - check the Status Report.\n"); printf("\n... EPANET ran with warnings - check the Status Report.\n");
return 0;
} }
else else
{ {
ENgeterror(errcode, errmsg, 256); ENgeterror(errcode, errmsg, 255);
printf("\n... EPANET failed with ERROR %d: %s.\n", errcode, errmsg); printf("\n... EPANET failed with ERROR %d: %s.\n", errcode, errmsg);
}
return errcode; return errcode;
} }
}