Add line number and source file to some error messages
This commit is contained in:
parent
8e8716abc7
commit
bce621680b
|
|
@ -374,6 +374,7 @@ inp_subcktexpand(struct card *deck) {
|
||||||
for (c = deck; c; c = c->nextcard)
|
for (c = deck; c; c = c->nextcard)
|
||||||
if (ciprefix(invoke, c->line)) {
|
if (ciprefix(invoke, c->line)) {
|
||||||
fprintf(cp_err, "Error: unknown subckt: %s\n", c->line);
|
fprintf(cp_err, "Error: unknown subckt: %s\n", c->line);
|
||||||
|
fprintf(cp_err, " in line no. %d from file %s\n", c->linenum_orig, c->linesource);
|
||||||
if (use_numparams)
|
if (use_numparams)
|
||||||
nupa_signal(NUPAEVALDONE);
|
nupa_signal(NUPAEVALDONE);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -476,6 +477,8 @@ doit(struct card *deck, wordlist *modnames) {
|
||||||
if (ciprefix(sbend, c->line)) { /* if line == .ends */
|
if (ciprefix(sbend, c->line)) { /* if line == .ends */
|
||||||
fprintf(cp_err, "Error: misplaced %s line: %s\n", sbend,
|
fprintf(cp_err, "Error: misplaced %s line: %s\n", sbend,
|
||||||
c->line);
|
c->line);
|
||||||
|
fprintf(cp_err, " line no. %d from file %s \n",
|
||||||
|
c->linenum_orig, c->linesource);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -486,6 +489,8 @@ doit(struct card *deck, wordlist *modnames) {
|
||||||
|
|
||||||
if (!ends) {
|
if (!ends) {
|
||||||
fprintf(cp_err, "Error: no %s line.\n", sbend);
|
fprintf(cp_err, "Error: no %s line.\n", sbend);
|
||||||
|
fprintf(cp_err, " in file %s \n",
|
||||||
|
c->linesource);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue