]> code.citadel.org Git - citadel.git/blobdiff - webcit/subst.c
SUBST: complain about unknown tokens while parsing
[citadel.git] / webcit / subst.c
index 6e5ab6fc690248e63532ddf0408ae3c8bfff4cac..09727d9f14ad8a671df0e7d95c801115e77bcdb3 100644 (file)
@@ -113,6 +113,7 @@ const char *CtxNames[]  = {
        "Context SIEVE Script",
        "Context MailQ-Item",
        "Context MailQ-Recipient",
+       "Context ServLogStatus",
        "Context UNKNOWN"
 };
 
@@ -583,10 +584,10 @@ long GetTemplateTokenNumber(StrBuf *Target, WCTemplputParams *TP, int N, long df
 }
 
 
-/**
- * \brief puts string into the template and computes which escape methon we should use
- * \param Source the string we should put into the template
- * \param FormatTypeIndex where should we look for escape types if?
+/*
+ * puts string into the template and computes which escape methon we should use
+ * Source = the string we should put into the template
+ * FormatTypeIndex = where should we look for escape types if?
  */
 void StrBufAppendTemplate(StrBuf *Target, 
                          WCTemplputParams *TP,
@@ -1056,6 +1057,11 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
                                if (Handler->PreEvalFunc != NULL)
                                        Handler->PreEvalFunc(NewToken);
                        }
+               } else {
+                       LogTemplateError(
+                               NULL, "Token ", ERR_NAME, &TP,
+                               " isn't known to us.", 
+                               NULL);
                }
                break;
        case SV_GETTEXT: