X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fcommon.c;h=bc1cb8df749cb63ec2ef392300551c37262c6e16;hb=2c3d2e7de4d4aea3536ea79ced23677e24589833;hp=3cb4323151c86cbc46a0c80cfe73241537e253ac;hpb=8360f12a6a457b73ebb18dbeedbb15e6ed91318b;p=ypp-sc-tools.db-test.git diff --git a/pctb/common.c b/pctb/common.c index 3cb4323..bc1cb8d 100644 --- a/pctb/common.c +++ b/pctb/common.c @@ -88,8 +88,14 @@ int dbfile_scanf(const char *fmt, ...) { } void dbfile_assertfail(const char *file, int line, const char *m) { - fatal("Error in database file %s at byte %ld:\n" - " Requirement not met at %s:%d:\n" - " %s", - path,(long)ftell(dbfile), file,line, m); + if (dbfile) + fatal("Error in dictionary file %s at byte %ld:\n" + " Requirement not met at %s:%d:\n" + " %s", + path,(long)ftell(dbfile), file,line, m); + else + fatal("Semantic error in dictionaries:\n" + " Requirement not met at %s:%d:\n" + " %s", + file,line, m); }