mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-24 02:03:06 +02:00
Print call stack if an error occurs in a user-defined function.
This commit is contained in:
+6
-2
@@ -605,12 +605,16 @@ void Eprint(char const *fmt, ...)
|
||||
|
||||
if (FreshLine && FileName) {
|
||||
FreshLine = 0;
|
||||
if (strcmp(FileName, "-"))
|
||||
if (strcmp(FileName, "-")) {
|
||||
print_callstack(ErrFp);
|
||||
(void) fprintf(ErrFp, "%s(%d): ", FileName, LineNo);
|
||||
else
|
||||
} else {
|
||||
print_callstack(ErrFp);
|
||||
(void) fprintf(ErrFp, "-stdin-(%d): ", LineNo);
|
||||
}
|
||||
if (DebugFlag & DB_PRTLINE) OutputLine(ErrFp);
|
||||
} else if (FileName) {
|
||||
print_callstack(ErrFp);
|
||||
fprintf(ErrFp, " ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user