[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[misc 08/18] DEBUG XFORM FAIL: Issue an error message as part of transfo
From: |
Ben Pfaff |
Subject: |
[misc 08/18] DEBUG XFORM FAIL: Issue an error message as part of transformation. |
Date: |
Sat, 11 Dec 2010 22:20:02 -0800 |
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.
---
src/language/xforms/fail.c | 15 +++++++--------
tests/language/stats/rank.at | 2 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/language/xforms/fail.c b/src/language/xforms/fail.c
index d1cfabf..3ca9452 100644
--- a/src/language/xforms/fail.c
+++ b/src/language/xforms/fail.c
@@ -18,15 +18,14 @@
#include <stdlib.h>
-#include <data/case.h>
-#include <data/procedure.h>
-#include <data/transformations.h>
-#include <language/command.h>
-#include <language/lexer/lexer.h>
+#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 ac44189..99a0459 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
--
1.7.1
- [misc 00/18] miscellaneous minor improvements, Ben Pfaff, 2010/12/12
- [misc 06/18] expressions: Make extract_min_valid() parameter const., Ben Pfaff, 2010/12/12
- [misc 01/18] friedman: Fix GCC warning about uninitialized fr.w., Ben Pfaff, 2010/12/12
- [misc 15/18] i18n: Remove unnecessary #ifs., Ben Pfaff, 2010/12/12
- [misc 12/18] DO REPEAT: Make this command usable anywhere., Ben Pfaff, 2010/12/12
- [misc 16/18] AGGREGATE: Align arg_func_tab[] in columns., Ben Pfaff, 2010/12/12
- [misc 10/18] NPAR TESTS: Prefer lex_match_id() over lex_match_hyphenated_word(), Ben Pfaff, 2010/12/12
- [misc 14/18] ECHO: Use text_item, as intended., Ben Pfaff, 2010/12/12
- [misc 04/18] covariance: Fix const-ness of covariance_calculate[_unnormalized] retval., Ben Pfaff, 2010/12/12
- [misc 08/18] DEBUG XFORM FAIL: Issue an error message as part of transformation.,
Ben Pfaff <=
- [misc 18/18] value-parser: Remove redundant call to lex_force_string() in parse_value()., Ben Pfaff, 2010/12/12
- [misc 17/18] GET DATA: Fix punctuation in error message., Ben Pfaff, 2010/12/12
- [misc 07/18] INPUT PROGRAM: Remove unused enumeration., Ben Pfaff, 2010/12/12
- [misc 03/18] ONEWAY: Fix warning for passing "const" pointer as non-const parameter., Ben Pfaff, 2010/12/12
- [misc 09/18] q2c: Prefer lex_match_id() over lex_match_hyphenated_word() in emitted code., Ben Pfaff, 2010/12/12
- [misc 02/18] mann-whitney: Suppress GCC warning about unused parameter., Ben Pfaff, 2010/12/12
- [misc 05/18] categoricals: Make parameter to categoricals_done() const., Ben Pfaff, 2010/12/12
- [misc 13/18] float-format: Don't translate test strings., Ben Pfaff, 2010/12/12
- [misc 11/18] identifier: New function token_type_to_string()., Ben Pfaff, 2010/12/12
- Re: [misc 00/18] miscellaneous minor improvements, John Darrington, 2010/12/12