]> code.citadel.org Git - citadel.git/blobdiff - webcit/subst.c
SUBST: complain about unknown tokens while parsing
[citadel.git] / webcit / subst.c
index 41a352e6878b96373a18fe3b53c1eda7d42b2f04..09727d9f14ad8a671df0e7d95c801115e77bcdb3 100644 (file)
@@ -584,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,
@@ -1057,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: