aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classifiers/bayes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/classifiers/bayes.c b/src/classifiers/bayes.c
index f45f84a38..5d00505be 100644
--- a/src/classifiers/bayes.c
+++ b/src/classifiers/bayes.c
@@ -371,6 +371,11 @@ bayes_learn_spam (struct classifier_ctx* ctx, statfile_pool_t *pool,
nodes = nodes / FEATURE_WINDOW_SIZE + FEATURE_WINDOW_SIZE;
}
if (nodes < minnodes) {
+ g_set_error (err,
+ bayes_error_quark(), /* error domain */
+ 1, /* error code */
+ "message contains too few tokens: %d, while min is %d",
+ nodes, minnodes);
return FALSE;
}
}