From: Ben Pfaff Date: Sun, 12 Dec 2010 06:17:01 +0000 (-0800) Subject: DEBUG XFORM FAIL: Issue an error message as part of transformation. X-Git-Tag: v0.7.7~110 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc76abeb861faaa36c854dfc86e76d00d8089f4;p=pspp-builds.git DEBUG XFORM FAIL: Issue an error message as part of transformation. PSPP only returns a failure exit status if an error message is issued, but DEBUG XFORM FAIL doesn't issue an error message. This means that, if PSPP has no other errors, then it's difficult to tell that the transformation really did what it should have. This commit fixes the potential problem. --- diff --git a/src/language/xforms/fail.c b/src/language/xforms/fail.c index d1cfabf6..3ca94524 100644 --- a/src/language/xforms/fail.c +++ b/src/language/xforms/fail.c @@ -18,15 +18,14 @@ #include -#include -#include -#include -#include -#include +#include "data/case.h" +#include "data/procedure.h" +#include "data/transformations.h" +#include "language/command.h" +#include "language/lexer/lexer.h" +#include "libpspp/message.h" static int trns_fail (void *x, struct ccase **c, casenumber n); - - /* A transformation which is guaranteed to fail. */ @@ -34,10 +33,10 @@ static int trns_fail (void *x UNUSED, struct ccase **c UNUSED, casenumber n UNUSED) { + msg (SE, "DEBUG XFORM FAIL transformation executed"); return TRNS_ERROR; } - int cmd_debug_xform_fail (struct lexer *lexer, struct dataset *ds) { diff --git a/tests/language/stats/rank.at b/tests/language/stats/rank.at index ac44189c..99a0459f 100644 --- a/tests/language/stats/rank.at +++ b/tests/language/stats/rank.at @@ -538,6 +538,8 @@ Variables Created By RANK x into Rx(RANK of x) +rank.sps:14: error: RANK: DEBUG XFORM FAIL transformation executed + rank.sps:14: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP