Added information to the GDS read routine error output to indicate
the byte position of the error.
This commit is contained in:
parent
ec8ffe7333
commit
243e9652e5
|
|
@ -353,25 +353,31 @@ calmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
|||
char *format;
|
||||
char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10;
|
||||
{
|
||||
off_t filepos;
|
||||
|
||||
calmaTotalErrors++;
|
||||
if (CIFWarningLevel == CIF_WARN_NONE) return;
|
||||
|
||||
if ((calmaTotalErrors < 100) || (CIFWarningLevel != CIF_WARN_LIMIT))
|
||||
{
|
||||
filepos = ftello(calmaInputFile);
|
||||
|
||||
if (CIFWarningLevel == CIF_WARN_REDIRECT)
|
||||
{
|
||||
if (calmaErrorFile != NULL)
|
||||
{
|
||||
fprintf(calmaErrorFile, "Error while reading cell \"%s\": ",
|
||||
fprintf(calmaErrorFile, "Error while reading cell \"%s\" ",
|
||||
cifReadCellDef->cd_name);
|
||||
fprintf(calmaErrorFile, "(byte position %"DLONG_PREFIX"ld): ",
|
||||
(dlong)filepos);
|
||||
fprintf(calmaErrorFile, format, a1, a2, a3, a4, a5, a6, a7,
|
||||
a8, a9, a10);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TxError("Error while reading cell \"%s\": ", cifReadCellDef->cd_name);
|
||||
TxError("Error while reading cell \"%s\" ", cifReadCellDef->cd_name);
|
||||
TxError("(byte position %"DLONG_PREFIX"d): ", (dlong)filepos);
|
||||
TxError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue