Expansions: more detail in error messages
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 14 Jan 2016 22:08:56 +0000 (22:08 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 14 Jan 2016 22:08:56 +0000 (22:08 +0000)
src/src/expand.c
test/stdout/0002

index 2966c22c626f33316616d7cbc8500652f408a972..85d8c6a27c18bd5e9b76d5e0a4185f2f88ba9092 100644 (file)
@@ -3155,7 +3155,8 @@ Arguments:
   yieldptr       points to the output string pointer
   sizeptr        points to the output string size
   ptrptr         points to the output string pointer
   yieldptr       points to the output string pointer
   sizeptr        points to the output string size
   ptrptr         points to the output string pointer
-  type           "lookup" or "if" or "extract" or "run", for error message
+  type           "lookup", "if", "extract", "run", "env", "listextract" or
+                 "certextract" for error message
   resetok       if not NULL, pointer to flag - write FALSE if unsafe to reset
                the store.
 
   resetok       if not NULL, pointer to flag - write FALSE if unsafe to reset
                the store.
 
@@ -5481,7 +5482,7 @@ while (*s != 0)
                &yield,                       /* output pointer */
                &size,                        /* output size */
                &ptr,                         /* output current point */
                &yield,                       /* output pointer */
                &size,                        /* output size */
                &ptr,                         /* output current point */
-               US"extract",                  /* condition type */
+               US"listextract",              /* condition type */
               &resetok))
         {
         case 1: goto EXPAND_FAILED;          /* when all is well, the */
               &resetok))
         {
         case 1: goto EXPAND_FAILED;          /* when all is well, the */
@@ -5553,7 +5554,7 @@ while (*s != 0)
                &yield,                       /* output pointer */
                &size,                        /* output size */
                &ptr,                         /* output current point */
                &yield,                       /* output pointer */
                &size,                        /* output size */
                &ptr,                         /* output current point */
-               US"extract",                  /* condition type */
+               US"certextract",              /* condition type */
               &resetok))
         {
         case 1: goto EXPAND_FAILED;          /* when all is well, the */
               &resetok))
         {
         case 1: goto EXPAND_FAILED;          /* when all is well, the */
index 5293d25874e25a0a474ccec44d3279bedb05727e..ee351a2784b92597350deed1ea48bbfcadaf3bf6 100644 (file)
@@ -72,7 +72,7 @@
 > listextract: 
 > listextract: 
 > listextract: fail
 > listextract: 
 > listextract: 
 > listextract: fail
-> Failed: "extract" failed and "fail" requested
+> Failed: "listextract" failed and "fail" requested
 > 
 > sort: 1:2:3:4
 > sort: 4,3,2,1
 > 
 > sort: 1:2:3:4
 > sort: 4,3,2,1